*** Core.pm 2004-07-02 15:49:41.000000000 -0700 --- Razor2/Client/Core.pm 2004-09-23 19:30:40.000000000 -0700 *************** *** 12,17 **** --- 12,18 ---- use strict; + use Socket; use IO::Socket; *************** *** 1728,1741 **** unless ($sock) { $sock = IO::Socket::INET->new( ! PeerAddr => $server, PeerPort => $port, Proto => 'tcp', Timeout => 20, ); unless ( $sock ) { ! $self->log (3,"Unable to connect to $server:$port; Reason: $!."); return if $params{discovery_server}; $self->nextserver or do { return $self->errprefix("connect1"); }; return $self->connect; --- 1729,1745 ---- unless ($sock) { + + my $packed = gethostbyname($server); + my $address = inet_ntoa($packed); $sock = IO::Socket::INET->new( ! PeerAddr => $address, PeerPort => $port, Proto => 'tcp', Timeout => 20, ); unless ( $sock ) { ! $self->log (3,"Unable to connect to $server:$address:$port; Reason: $!."); return if $params{discovery_server}; $self->nextserver or do { return $self->errprefix("connect1"); }; return $self->connect;