Skip to content

Commit

Permalink
Make port an Int if extracted from host:port in host
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Jun 4, 2015
1 parent ad21e90 commit b9ab2c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/IO/Socket/INET.pm
Expand Up @@ -45,7 +45,7 @@ my class IO::Socket::INET does IO::Socket {
?? v6-split(%args<host>)
!! v4-split(%args<host>);
if $port {
%args<port> //= $port;
%args<port> //= $port.Int;
%args<host> = $host;
}
}
Expand All @@ -54,7 +54,7 @@ my class IO::Socket::INET does IO::Socket {
?? v6-split(%args<localhost>)
!! v4-split(%args<localhost>);
if $port {
%args<localport> //= $port;
%args<localport> //= $port.Int;
%args<localhost> = $peer;
}
}
Expand Down

0 comments on commit b9ab2c2

Please sign in to comment.