Subject: | Regression: recv() no longer blocks if no timeout is supplied |
Date: | Thu, 17 Jun 2010 18:01:41 -0700 |
To: | bug-Net-Stomp [...] rt.cpan.org |
From: | Michael Fischer <michael [...] dynamine.net> |
Net::Stomp::recv() no longer blocks waiting for a new frame if no
timeout is supplied (instead, it returns undef immediately). This is
a regression from previous versions.
To fix this, the following change must be made in can_read():
sub can_read {
my ( $self, $conf ) = @_;
$conf ||= {};
my $timeout = exists $conf->{timeout} ? $conf->{timeout} : undef; # not 0
return $self->select->can_read($timeout) || 0;
}