This commit is contained in:
Carl Lerche
2017-06-29 20:41:46 -07:00
parent 076bf204e7
commit 0564747121
2 changed files with 11 additions and 6 deletions

View File

@@ -62,11 +62,17 @@ impl<T, P> Stream for Connection<T, P>
fn poll(&mut self) -> Poll<Option<Self::Item>, ConnectionError> {
use frame::Frame::*;
// Because receiving new frames may depend on ensuring that the write
// buffer is clear, `poll_complete` is called here.
let frame = match try!(self.inner.poll()) {
Async::Ready(f) => f,
Async::NotReady => {
// Because receiving new frames may depend on ensuring that the
// write buffer is clear, `poll_complete` is called here.
let _ = try!(self.poll_complete());
return Ok(Async::NotReady);
}
};
let frame = match try_ready!(self.inner.poll()) {
let frame = match frame {
Some(Headers(v)) => {
// TODO: Update stream state
let stream_id = v.stream_id();

View File

@@ -92,8 +92,7 @@ impl<T> Stream for Settings<T>
// Save off the settings
self.remote = v.into_set();
// TODO: uncomment?
// let _ = try!(self.try_send_pending());
let _ = try!(self.try_send_pending());
}
}
v => return Ok(Async::Ready(v)),