Close outbound stream after sending (#1369)
This commit is contained in:
parent
e940dcea47
commit
1c90c816b7
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user