[pve-devel] [PATCH] qemu-server: vncproxy: qm: wait max 10s for the socket if it does not exist
Stefan Priebe
s.priebe at profihost.ag
Thu Feb 28 14:05:15 CET 2013
Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
---
qm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/qm b/qm
index 93f621c..2ab5eaa 100755
--- a/qm
+++ b/qm
@@ -48,6 +48,9 @@ sub run_vnc_proxy {
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);
die "unable to connect to socket '$path' - $!" if !$s;
--
1.7.10.4
More information about the pve-devel
mailing list