mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 14:51:34 +00:00
Fix Transport::and_then (#690)
This commit is contained in:
@ -149,6 +149,7 @@ where
|
||||
type Error = T::Error;
|
||||
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
loop {
|
||||
let future = match self.inner {
|
||||
Either::A(ref mut future) => {
|
||||
let item = try_ready!(future.poll());
|
||||
@ -157,8 +158,9 @@ where
|
||||
}
|
||||
Either::B(ref mut future) => return future.poll()
|
||||
};
|
||||
|
||||
self.inner = Either::B(future);
|
||||
Ok(Async::NotReady)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user