Fix send flow control bug
The send stream state is transitioned before data is buffered. As such, the stream state could be closed while there is still data to be sent.
This commit is contained in:
		| @@ -36,6 +36,8 @@ impl Settings { | ||||
|               B: Buf, | ||||
|               C: Buf, | ||||
|     { | ||||
|         trace!("send_pending_ack; pending={:?}", self.pending); | ||||
|  | ||||
|         if let Some(ref settings) = self.pending { | ||||
|             let frame = frame::Settings::ack(); | ||||
|  | ||||
| @@ -44,7 +46,7 @@ impl Settings { | ||||
|                 return Ok(Async::NotReady); | ||||
|             } | ||||
|  | ||||
|             trace!("ACK sent"); | ||||
|             trace!("ACK sent; applying settings"); | ||||
|  | ||||
|             dst.apply_remote_settings(settings); | ||||
|             streams.apply_remote_settings(settings)?; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user