]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QMPClient.pm
do not delete unmatched content from $$input
[qemu-server.git] / PVE / QMPClient.pm
index 6782c377b77cac5577b82eee4a946c54638c8bd4..45fcba4befad6ad252b53a3472aa41bc5e1d452a 100755 (executable)
@@ -259,12 +259,9 @@ sub queue_execute {
 sub mux_input {
     my ($self, $mux, $fh, $input) = @_;
 
-    return if $$input !~ m/}\r\n$/;
+    return if $$input !~ s/^(.*})\r\n(.*)$/$2/so;
 
-    my $raw = $$input;
-
-    # Remove the input from the input buffer.
-    $$input = '';
+    my $raw = $1;
 
     my $vmid = $self->{fhs_lookup}->{$fh};
     if (!$vmid) {