RequestState constructor
RequestState(
- NdkRequest request
Creates a new RequestState instance
Implementation
RequestState(this.request) : unresolvedFilters = request.filters {
// if we have a timeout set, we start it
if (request.timeoutDuration != null) {
timeoutDuration = request.timeoutDuration;
_startTimeout(timeoutDuration!);
}
_streamSubscription = controller.listen(
(e) {},
onDone: () {
if (_timeout != null) {
_timeout!.cancel();
}
// a query ends here rather than on close(), its controller is closed
// by the response cleaner once every relay is done
_relayOutcomesDone = true;
_relayOutcomesSubject?.close();
_streamSubscription.cancel();
},
);
}