mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-05 08:37:37 +00:00
QMPClient: add destructor
Explicitly close leftover connections in the destructor, otherwise the IO::Multiplex instance can be leaked causing the qmp connection to never be closed. This could occur for instance when cancelling vzdump with ctrl+c with extremely unlucky timing... Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
73a4470a8f
commit
56afd466dd
@ -509,4 +509,13 @@ sub mux_eof {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub DESTROY {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
foreach my $sname (keys %{$self->{queue_info}}) {
|
||||||
|
my $queue_info = $self->{queue_info}->{$sname};
|
||||||
|
$close_connection->($self, $queue_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user