You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.
In my project I need to execute some action if a stream has not responded for some amount of time and then continue with normal operation of the stream; essentially, an idle callback.
I copied TimeoutStream into my project and modified a few lines. Instead of raising on error on timeout I invoke a closure and resume polling the stream.
// [...]Ok(Async::Ready(_)) => {// Timeout has elapsed, reest and continueself.sleep = self.timer.sleep(self.duration);(self.on_idle)();self.poll()}// [...]
Would this IdleStream be a good fit for inclusion in this crate ?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In my project I need to execute some action if a stream has not responded for some amount of time and then continue with normal operation of the stream; essentially, an idle callback.
I copied
TimeoutStream
into my project and modified a few lines. Instead of raising on error on timeout I invoke a closure and resume polling the stream.Would this
IdleStream
be a good fit for inclusion in this crate ?The text was updated successfully, but these errors were encountered: