From 8bd0cbf5c3b52be6acd85b79d142113f1fd11636 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 25 Jun 2013 12:54:15 +0200 Subject: [PATCH] spice proxy: try to cirrectly count open socat connections --- PVE/API2/Qemu.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 1ab42494..5d9cbb92 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -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; } };