spice proxy: try to cirrectly count open socat connections

This commit is contained in:
Dietmar Maurer 2013-06-25 12:54:15 +02:00
parent 5ecf258f2c
commit 8bd0cbf5c3

View 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;
}
};