mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-25 06:03:52 +03:00
kill socat if we do not get any connection within $timeout seconds
This commit is contained in:
parent
d914737577
commit
eb15737004
@ -1411,7 +1411,13 @@ __PACKAGE__->register_method({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
eval { PVE::Tools::run_command($cmd, errfunc => $parser, outfunc => sub{}); };
|
eval {
|
||||||
|
# kill socat if we do not get any connection within $timeout seconds
|
||||||
|
local $SIG{ALRM} = sub { die "got timeout\n" if $conn_count <= 0; };
|
||||||
|
alarm($timeout);
|
||||||
|
|
||||||
|
PVE::Tools::run_command($cmd, errfunc => $parser, outfunc => sub{});
|
||||||
|
};
|
||||||
if (my $err = $@) {
|
if (my $err = $@) {
|
||||||
die $err if $err !~ m/client exit$/;
|
die $err if $err !~ m/client exit$/;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user