From 21ee68579c4997a2e7b36e0f4f0f970ce9ab4e26 Mon Sep 17 00:00:00 2001 From: neevek Date: Tue, 21 Nov 2023 00:40:45 +0800 Subject: [PATCH] fix TunnelIn --- src/access_server.rs | 1 + src/server.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/access_server.rs b/src/access_server.rs index 2ab2164..c0f6cc9 100644 --- a/src/access_server.rs +++ b/src/access_server.rs @@ -107,6 +107,7 @@ impl AccessServer { drop(tcp_receiver); // initiate a new connection to wake up the accept() loop + self.set_drop_conn(false); TcpStream::connect(self.addr).await?; Ok(()) } diff --git a/src/server.rs b/src/server.rs index 54b08dc..1275b30 100644 --- a/src/server.rs +++ b/src/server.rs @@ -339,6 +339,7 @@ impl Server { } }); + access_server.set_drop_conn(false); let mut tcp_receiver = access_server.take_tcp_receiver(); while let Some(Some(ChannelMessage::Request(tcp_stream))) = tcp_receiver.recv().await { match client_conn.open_bi().await { @@ -363,7 +364,7 @@ impl Server { access_server.shutdown(tcp_receiver).await.ok(); - info!("will quit access server: {}", addr); + info!("access server quit: {}", addr); Ok(()) }