Skip to content

Commit

Permalink
fix TunnelIn
Browse files Browse the repository at this point in the history
  • Loading branch information
neevek committed Nov 20, 2023
1 parent cd473f8 commit 21ee685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/access_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down
3 changes: 2 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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(())
}
Expand Down

0 comments on commit 21ee685

Please sign in to comment.