fix(cgi-bin): don't insert when using existing pipe

main
Tsu-ba-me 3 years ago
parent 6711b65151
commit ef27e30160
  1. 5
      cgi-bin/manage_vnc_pipes

@ -247,6 +247,7 @@ sub start_websockify
$ws_info = {};
$ws_info->{pid} = $existing_websockify->{ws_pid};
$ws_info->{source_port} = $existing_websockify->{ssh_tunnel_forward_port};
$ws_info->{is_existing} = 1;
}
else
{
@ -329,6 +330,7 @@ sub start_ssh_tunnel
{
$ssh_tunnel_info = {};
$ssh_tunnel_info->{pid} = $existing_ssh_tunnel->{ssh_tunnel_pid};
$ssh_tunnel_info->{is_existing} = 1;
}
else
{
@ -636,6 +638,8 @@ sub open_vnc_pipe
return;
}
if (not $ws_info->{is_existing} or not $ssh_tunnel_info->{is_existing})
{
insert_vnc_pipe({
server_uuid => $server_uuid,
server_vnc_port => $vnc_info->{port},
@ -646,6 +650,7 @@ sub open_vnc_pipe
ssh_tunnel_forward_port => $ws_info->{source_port}
});
}
}
sub close_vnc_pipe
{

Loading…
Cancel
Save