]> git.proxmox.com Git - qemu-server.git/commitdiff
turn off alarm timer after accepting a vnc connection
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 18 Apr 2017 07:24:40 +0000 (09:24 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 18 Apr 2017 12:14:07 +0000 (14:14 +0200)
else we always get a failed task when the vnc connection is
running longer than $timeout

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Qemu.pm

index 616dc48b88dfcc4541462ac6a8b24eeeadba88c9..24a5b67c73424e81ae20ba3d1982812c8c22ad46 100644 (file)
@@ -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),