update port-forward

1. fix multi remote port override.
2. add connection.rs port-forward failed to close
This commit is contained in:
csf
2022-08-29 19:45:06 +08:00
parent 37617fa888
commit fcc62febb1
4 changed files with 14 additions and 6 deletions

View File

@@ -1253,7 +1253,6 @@ async fn start_one_port_forward(
key: &str,
token: &str,
) {
handler.lc.write().unwrap().port_forward = (remote_host, remote_port);
if let Err(err) = crate::port_forward::listen(
handler.id.clone(),
handler.password.clone(),
@@ -1262,6 +1261,9 @@ async fn start_one_port_forward(
receiver,
key,
token,
handler.lc.clone(),
remote_host,
remote_port,
)
.await
{