Skip to content

Commit

Permalink
Re-allow Inf as an argument to .recv.
Browse files Browse the repository at this point in the history
This got broken in recent refactoring, and the module ecosytem was
relying on it.
  • Loading branch information
jnthn authored and zoffixznet committed May 26, 2017
1 parent 807d99f commit 0b67e67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/IO/Socket.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ my role IO::Socket {
}

# The if bin is true, will return Buf, Str otherwise
method recv(Int(Cool) $limit = 65535, :$bin? = False) {
method recv(Cool $limit? is copy, :$bin? = False) {
fail('Socket not available') unless $!PIO;
$limit = 65535 if !$limit.DEFINITE || $limit === Inf;
if $bin {
nqp::readfh($!PIO, nqp::decont(buf8.new), $limit)
}
Expand Down

0 comments on commit 0b67e67

Please sign in to comment.