Close outbound stream after sending (#1369)

This commit is contained in:
Pawan Dhananjay 2020-07-21 06:27:44 +05:30 committed by GitHub
parent e940dcea47
commit 1c90c816b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,7 +395,11 @@ where
let mut socket = Framed::new(socket, codec); let mut socket = Framed::new(socket, codec);
let future = async { socket.send(self).await.map(|_| socket) }; let future = async {
socket.send(self).await?;
socket.close().await?;
Ok(socket)
};
Box::pin(future) Box::pin(future)
} }
} }