From b006e70b6874d6cf718de8ec68f2b621e22db8cc Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 18 Apr 2013 10:34:44 +0200 Subject: [PATCH] avoid endless loop in QMPClient --- PVE/QMPClient.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm index 45fcba4b..3326c435 100755 --- a/PVE/QMPClient.pm +++ b/PVE/QMPClient.pm @@ -254,6 +254,15 @@ sub queue_execute { $self->{queue} = $self->{current} = $self->{fhs} = $self->{fhs_lookup} = {}; } +sub mux_close { + my ($self, $mux, $fh) = @_; + + my $vmid = $self->{fhs_lookup}->{$fh} || 'undef'; + return if !defined($vmid); + + $self->{errors}->{$vmid} = "client closed connection\n" if !$self->{errors}->{$vmid}; +} + # mux_input is called when input is available on one of # the descriptors. sub mux_input {