mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Close outbound stream after sending (#1369)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user