Send Close when shutting down gracefully, as per spec (#631)

This commit is contained in:
David 2018-11-16 11:35:57 +01:00 committed by Pierre Krieger
parent 373b05347a
commit 2004b196e2

View File

@ -533,7 +533,7 @@ where C: AsyncRead + AsyncWrite
} }
fn shutdown_substream(&self, sub: &mut Self::Substream, _: Shutdown) -> Poll<(), IoError> { fn shutdown_substream(&self, sub: &mut Self::Substream, _: Shutdown) -> Poll<(), IoError> {
let elem = codec::Elem::Reset { let elem = codec::Elem::Close {
substream_id: sub.num, substream_id: sub.num,
endpoint: sub.endpoint, endpoint: sub.endpoint,
}; };