]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/DS.pm
DS: epoll: fix misordered EPOLL_CTL_DEL call
[public-inbox.git] / lib / PublicInbox / DS.pm
index 5dd1bb7cbf68637420dbca472cc1107c8de0faaa..779215c93e518bd0f29467285d505cc4d7d8596b 100644 (file)
@@ -333,8 +333,8 @@ sub EpollEventLoop {
                 } else {
                     my $fd = $ev->[0];
                     warn "epoll() returned fd $fd w/ state $state for which we have no mapping.  removing.\n";
-                    POSIX::close($fd);
                     epoll_ctl($Epoll, EPOLL_CTL_DEL, $fd, 0);
+                    POSIX::close($fd);
                 }
                 next;
             }
@@ -1033,13 +1033,6 @@ sub as_string {
     return $ret;
 }
 
-sub _undef {
-    return undef unless $ENV{DS_DEBUG};
-    my $msg = shift || "";
-    warn "PublicInbox::DS: $msg\n";
-    return undef;
-}
-
 package PublicInbox::DS::Timer;
 # [$abs_float_firetime, $coderef];
 sub cancel {