]> git.proxmox.com Git - qemu-server.git/commitdiff
spice proxy: try to cirrectly count open socat connections
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 25 Jun 2013 10:54:15 +0000 (12:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 25 Jun 2013 10:54:15 +0000 (12:54 +0200)
PVE/API2/Qemu.pm

index 1ab42494d5ccfba54e352c45fc24da242bbe2be3..5d9cbb92cfec0f1be4ba380dd1980ae79374dfeb 100644 (file)
@@ -1405,10 +1405,9 @@ __PACKAGE__->register_method({
                print "$line\n";
                if ($line =~ /successfully connected from/) {
                    $conn_count++;
-               } elsif ($line =~ /exiting with status/) {
+               } elsif ($line =~ /N exiting with status/ || $line =~ m/N exit\(/) {
                    $conn_count--;
-                   # Note: counting connections seems unreliable here
-                   die "client exit\n"; # if $conn_count <= 0;
+                   die "client exit\n" if $conn_count <= 0;
                }
            };