Close outbound stream after sending (#1369)

This commit is contained in:
Pawan Dhananjay
2020-07-21 10:57:44 +10:00
committed by GitHub
parent e940dcea47
commit 1c90c816b7
+5 -1
View File
@@ -395,7 +395,11 @@ where
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)
}
}