Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
just check for POLLNVAL too
  • Loading branch information
kraih committed Feb 13, 2015
1 parent 18519e3 commit 8c1ea1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Reactor/Poll.pm
@@ -1,7 +1,7 @@
package Mojo::Reactor::Poll;
use Mojo::Base 'Mojo::Reactor';

use IO::Poll qw(POLLERR POLLHUP POLLIN POLLOUT POLLPRI);
use IO::Poll qw(POLLERR POLLHUP POLLIN POLLNVAL POLLOUT POLLPRI);
use List::Util 'min';
use Mojo::Util qw(md5_sum steady_time);
use Time::HiRes 'usleep';
Expand Down Expand Up @@ -45,7 +45,7 @@ sub one_tick {
if (IO::Poll::_poll($timeout * 1000, @poll) > 0) {
while (my ($fd, $mode) = splice @poll, 0, 2) {

if ($mode & (POLLIN | POLLPRI | POLLHUP | POLLERR)) {
if ($mode & (POLLIN | POLLPRI | POLLHUP | POLLNVAL | POLLERR)) {
next unless my $io = $self->{io}{$fd};
++$i and $self->_sandbox('Read', $io->{cb}, 0);
}
Expand Down

0 comments on commit 8c1ea1e

Please sign in to comment.