From 058ff55b395fb2f60f7eee96b7fd746f141db33c Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 18 Apr 2017 09:24:40 +0200 Subject: [PATCH] turn off alarm timer after accepting a vnc connection else we always get a failed task when the vnc connection is running longer than $timeout Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 616dc48..24a5b67 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1435,6 +1435,7 @@ __PACKAGE__->register_method({ local $SIG{ALRM} = sub { die "connection timed out\n" }; alarm $timeout; accept(my $cli, $sock) or die "connection failed: $!\n"; + alarm(0); close($sock); if (PVE::Tools::run_command($cmd, output => '>&'.fileno($cli), -- 2.39.2