]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/DSPoll.pm
imap+nntp: share COMPRESS implementation
[public-inbox.git] / lib / PublicInbox / DSPoll.pm
index ce7c2faccb442db413f2234c401a82d6f9aaf998..56a400c20a533f41a9ce472cc0791d92e3825e31 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
 # Licensed the same as Danga::Socket (and Perl5)
 # License: GPL-1.0+ or Artistic-1.0-Perl
 #  <https://www.gnu.org/licenses/gpl-1.0.txt>
@@ -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;