mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-09 09:28:00 +00:00
qemu-server: vncproxy: qm: wait max 10s for the socket if it does not exist
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
This commit is contained in:
parent
8da4165a63
commit
7aca710470
3
qm
3
qm
@ -48,6 +48,9 @@ sub run_vnc_proxy {
|
|||||||
|
|
||||||
my $path = PVE::QemuServer::vnc_socket($vmid);
|
my $path = PVE::QemuServer::vnc_socket($vmid);
|
||||||
|
|
||||||
|
my $c;
|
||||||
|
while ( ++$c < 10 && !-e $path ) { sleep(1); }
|
||||||
|
|
||||||
my $s = IO::Socket::UNIX->new(Peer => $path, Timeout => 120);
|
my $s = IO::Socket::UNIX->new(Peer => $path, Timeout => 120);
|
||||||
|
|
||||||
die "unable to connect to socket '$path' - $!" if !$s;
|
die "unable to connect to socket '$path' - $!" if !$s;
|
||||||
|
Loading…
Reference in New Issue
Block a user