add localhost client aliasing on spots and PC92A
[spider.git] / perl / DXChannel.pm
index 56b96faa126d91d1b3256d7bba8944dfc453402b..84585ef1ee240f8d19ad10ba6d3468d386b26953 100644 (file)
@@ -185,7 +185,10 @@ sub alloc
        }
        $self->{inqueue} = [];
 
-       $self->{hostname} = $self->{conn}->peerhost if $conn;
+       if ($conn) {
+               $self->{hostname} = $self->{conn}->peerhost;
+               $self->{sockhost} = $self->{conn}->sockhost;
+       }
 
        $count++;
        dbg("DXChannel $self->{call} created ($count)") if isdbg('chan');