try to fix crashes on AGW with peerhost.
[spider.git] / perl / AGWMsg.pm
index 90f469d82afe107d174bbaefcb904a115c6a495a..76b80fde344ef5601c97df9df3f5837e1d744575 100644 (file)
@@ -46,7 +46,7 @@ $hpolltime = 300 unless defined $hpolltime;
 %circuit = ();
 $total_in = $total_out = 0;
 $lastconnect = 0;
-$connectinterval = 60;
+$connectinterval = 30;
 
 sub init
 {
@@ -409,6 +409,13 @@ sub _find
        return $circuit{$call};
 }
 
+sub peerhost
+{
+       my $conn = shift;
+       $conn->{peerhost} ||= $conn->{agwcall} || "UNKNOWN";
+       return $conn->{peerhost};
+}
+
 sub connect
 {
        my ($conn, $line) = @_;