added some more connection numbers
[spider.git] / perl / Msg.pm
index 815937963962169d8fb2e4d8e0808cb8675bc2a4..3a422c3a817c4c93fe32fdd1c1f2f281c5a61e0f 100644 (file)
@@ -134,9 +134,9 @@ sub pid_gone
        my ($pkg, $pid) = @_;
        
        my @pid = grep {$_->{pid} == $pid} values %conns;
-       for (@pid) {
-               &{$_->{eproc}}($_, "$pid has gorn") if exists $_->{eproc};
-               $_->disconnect;
+       foreach my $p (@pid) {
+               &{$p->{eproc}}($p, "$pid has gorn") if exists $p->{eproc};
+               $p->disconnect;
        }
 }
 
@@ -436,8 +436,8 @@ sub close_server
 # close all clients (this is for forking really)
 sub close_all_clients
 {
-       for (values %conns) {
-               $_->disconnect;
+       foreach my $conn (values %conns) {
+               $conn->disconnect;
        }
 }