Skip to content

Commit

Permalink
Domain wasn't defaulting to AF_INET for some reason, even though it's
Browse files Browse the repository at this point in the history
clearly documented as doing so.  Now it does!
  • Loading branch information
rcaputo committed Jun 28, 2006
1 parent d0f0cce commit b8eb37d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/POE/Component/Server/TCP.pm
Expand Up @@ -8,7 +8,7 @@ use vars qw($VERSION);
$VERSION = do {my($r)=(q$Revision$=~/(\d+)/);sprintf"1.%04d",$r};

use Carp qw(carp croak);
use Socket qw(INADDR_ANY inet_ntoa inet_aton AF_UNIX PF_UNIX);
use Socket qw(INADDR_ANY inet_ntoa inet_aton AF_INET AF_UNIX PF_UNIX);
use Errno qw(ECONNABORTED ECONNRESET);

# Explicit use to import the parameter constants.
Expand Down Expand Up @@ -44,7 +44,7 @@ sub new {
my $address = delete $param{Address};
my $hname = delete $param{Hostname};
my $port = delete $param{Port};
my $domain = delete $param{Domain};
my $domain = delete($param{Domain}) || AF_INET;
my $concurrency = delete $param{Concurrency};

foreach (
Expand Down Expand Up @@ -181,8 +181,7 @@ sub new {
# to pull most of this into a base class and derive
# TCP and UNIX versions from that.
if (
defined $domain and
($domain == AF_UNIX or $domain == PF_UNIX)
$domain == AF_UNIX or $domain == PF_UNIX
) {
$heap->{remote_ip} = "LOCAL";
}
Expand Down

0 comments on commit b8eb37d

Please sign in to comment.