Skip to content

Commit

Permalink
Fixed tunnels not closing properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
zlogic committed Jul 27, 2024
1 parent ecc579c commit b73d0b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ impl ProxyClientConnection {
async fn close(&mut self, socket: &mut smoltcp::socket::tcp::Socket<'_>) {
use tokio::io::AsyncWriteExt;
socket.close();
if let Some(tunnel) = self.tunnel.as_mut() {
if let Some(mut tunnel) = self.tunnel.take() {
if let Err(err) = tunnel.shutdown().await {
debug!("Failed to shut down proxy client socket: {}", err);
}
Expand Down

0 comments on commit b73d0b0

Please sign in to comment.