X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FDSPoll.pm;h=56a400c20a533f41a9ce472cc0791d92e3825e31;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=e65640a8c755afb025d1a5a27c773a30ecc18f1d;hpb=4f868db3675eeee5994edc4fe79a9a2583623747;p=public-inbox.git
diff --git a/lib/PublicInbox/DSPoll.pm b/lib/PublicInbox/DSPoll.pm
index e65640a8..56a400c2 100644
--- a/lib/PublicInbox/DSPoll.pm
+++ b/lib/PublicInbox/DSPoll.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors
+# Copyright (C) 2019-2021 all contributors
# Licensed the same as Danga::Socket (and Perl5)
# License: GPL-1.0+ or Artistic-1.0-Perl
#
@@ -14,7 +14,7 @@ use warnings;
use parent qw(Exporter);
use IO::Poll;
use PublicInbox::Syscall qw(EPOLLONESHOT EPOLLIN EPOLLOUT EPOLL_CTL_DEL);
-our @EXPORT = qw(epoll_ctl epoll_wait);
+our @EXPORT_OK = qw(epoll_ctl epoll_wait);
sub new { bless {}, $_[0] } # fd => events
@@ -45,14 +45,13 @@ sub epoll_wait {
my $fd = $pset[$i++];
my $revents = $pset[$i++] or next;
delete($self->{$fd}) if $self->{$fd} & EPOLLONESHOT;
- push @$events, [ $fd ];
+ push @$events, $fd;
}
my $nevents = scalar @$events;
if ($n != $nevents) {
warn "BUG? poll() returned $n, but got $nevents";
}
}
- $n;
}
1;