Signed-off-by: Dietmar Maurer <[email protected]>
---
PVE/APIClient/Commands/lxc.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/PVE/APIClient/Commands/lxc.pm b/PVE/APIClient/Commands/lxc.pm
index 4988bf2..f981c11 100644
--- a/PVE/APIClient/Commands/lxc.pm
+++ b/PVE/APIClient/Commands/lxc.pm
@@ -203,7 +203,9 @@ __PACKAGE__->register_method ({
my $wb_socket_read_available_bytes = sub {
my $nr = $web_socket->sysread($wsbuf, $max_payload_size,
length($wsbuf));
- die "web socket read error - $!\n" if $nr < 0;
+ if (!defined($nr) && !($! == EINTR || $! == EAGAIN)) {
+ die "web socket read error - $!\n";
+ }
return $nr;
};
@@ -319,7 +321,7 @@ __PACKAGE__->register_method ({
my $nr = $wb_socket_read_available_bytes->();
if (!defined($nr)) {
- die "web socket read error $!\n";
+ # wait
} elsif ($nr == 0) {
return; # EOF
} else {
--
2.11.0
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel