mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 16:14:11 +00:00
fix: flush local-tun tcp writer half before close (#1759)
This commit is contained in:
@@ -357,7 +357,7 @@ impl TcpTun {
|
||||
}
|
||||
|
||||
// SHUT_WR
|
||||
if matches!(control.send_state, TcpSocketState::Close) {
|
||||
if matches!(control.send_state, TcpSocketState::Close) && socket.send_queue() == 0 && control.send_buffer.is_empty() {
|
||||
trace!("closing TCP Write Half, {:?}", socket.state());
|
||||
|
||||
// Close the socket. Set to FIN state
|
||||
|
||||
Reference in New Issue
Block a user