update html docs
[spider.git] / perl / Msg.pm
index 815937963962169d8fb2e4d8e0808cb8675bc2a4..03151ca1976aa8906a2b7d7566143ae65dd83f8f 100644 (file)
@@ -118,7 +118,7 @@ sub conns
        if (ref $pkg) {
                $call = $pkg->{call} unless $call;
                return undef unless $call;
-               confess "changing $pkg->{call} to $call" if exists $pkg->{call} && $call ne $pkg->{call};
+               dbg('connll', "changing $pkg->{call} to $call") if exists $pkg->{call} && $call ne $pkg->{call};
                $pkg->{call} = $call;
                $ref = $conns{$call} = $pkg;
                dbg('connll', "Connection $pkg->{cnum} $call stored");
@@ -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;
        }
 }