X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FIntMsg.pm;h=e3360fdbf566cf6990dda643c41a78953a3a65bd;hb=f319bf06d72d135e7ec14ff8b27627187f5e2595;hp=6e588b3ef7ddbb86c0165e229d37181c08179253;hpb=55f14d9038abb44d61ac63298f9f39b9e53a39d1;p=spider.git diff --git a/perl/IntMsg.pm b/perl/IntMsg.pm index 6e588b3e..e3360fdb 100644 --- a/perl/IntMsg.pm +++ b/perl/IntMsg.pm @@ -27,7 +27,7 @@ sub dequeue { my $conn = shift; - if ($conn->{msg} =~ /\n/) { + if ($conn && $conn->{msg} =~ /\n/) { my @lines = split /\r?\n/, $conn->{msg}; if ($conn->{msg} =~ /\n$/) { delete $conn->{msg}; @@ -41,7 +41,7 @@ sub dequeue } else { $_ = ''; } - &{$conn->{rproc}}($conn, $_); + &{$conn->{rproc}}($conn, $_) if exists $conn->{rproc}; } } }