mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-18 10:24:30 +00:00
qmp_read_available : correctly handle end of response
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
bcb7c9cff5
commit
ae287df075
@ -2691,7 +2691,7 @@ my $qmp_read_avail = sub {
|
|||||||
my $count;
|
my $count;
|
||||||
if ($count = $fh->sysread($buf, 8192)) {
|
if ($count = $fh->sysread($buf, 8192)) {
|
||||||
$res .= $buf;
|
$res .= $buf;
|
||||||
last;
|
last if $buf =~ (m/}\r\n$/);
|
||||||
} else {
|
} else {
|
||||||
if (!defined($count)) {
|
if (!defined($count)) {
|
||||||
die "$!\n";
|
die "$!\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user