lxc enter: use IO::Select->select
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 8 Jun 2018 05:06:37 +0000 (07:06 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 8 Jun 2018 09:01:06 +0000 (11:01 +0200)
PVE/APIClient/Commands/lxc.pm

index f0c85f7..c092028 100644 (file)
@@ -277,10 +277,10 @@ __PACKAGE__->register_method ({
            };
 
            while (1) {
-               while(my @ready = $select->can_read(3)) {
+               while(my ($readable) = IO::Select->select($select, undef, undef, 3)) {
                    $check_terminal_size->() if $winch_received;
 
-                   foreach my $fh (@ready) {
+                   foreach my $fh (@$readable) {
 
                        if ($fh == $web_socket) {
                            # Read from WebSocket