notify stream refs when the connection receives EOF (#176)

This commit is contained in:
Sean McArthur
2017-11-28 13:42:22 -08:00
committed by GitHub
parent 79003d0d45
commit 2be2523162
5 changed files with 76 additions and 1 deletions

View File

@@ -223,6 +223,16 @@ impl State {
}
}
pub fn recv_eof(&mut self) {
match self.inner {
Closed(..) => {},
s => {
trace!("recv_eof; state={:?}", s);
self.inner = Closed(Some(Cause::Io));
}
}
}
/// Indicates that the local side will not send more data to the local.
pub fn send_close(&mut self) {
match self.inner {