about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-02 03:39:35 +0000
committerEric Wong <e@80x24.org>2019-06-02 05:23:22 +0000
commita7f3800f33c1408c1779559d3efe13f70bc2a4fe (patch)
tree7668fa38f027380844fb9b1d07b03827022166b8
parente3b21590ec4b621f99a82b46683cd5feeba485d1 (diff)
downloadpublic-inbox-a7f3800f33c1408c1779559d3efe13f70bc2a4fe.tar.gz
I've used Danga::Socket for well over a decade in various
projects at this point and have never seen the need for it.

If such a bug ever happens; the process should fall over so
it gets fixed ASAP.
-rw-r--r--lib/PublicInbox/DS.pm19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index b2c4b44a..e11b23d7 100644
--- a/lib/PublicInbox/DS.pm
+++ b/lib/PublicInbox/DS.pm
@@ -269,16 +269,6 @@ sub EpollEventLoop {
             my $code;
             my $state = $ev->[1];
 
-            # if we didn't find a Perlbal::Socket subclass for that fd, try other
-            # pseudo-registered (above) fds.
-            if (! $pob) {
-                my $fd = $ev->[0];
-                warn "epoll() returned fd $fd w/ state $state for which we have no mapping.  removing.\n";
-                epoll_ctl($Epoll, EPOLL_CTL_DEL, $fd, 0);
-                POSIX::close($fd);
-                next;
-            }
-
             DebugLevel >= 1 && $class->DebugMsg("Event: fd=%d (%s), state=%d \@ %s\n",
                                                 $ev->[0], ref($pob), $ev->[1], time);
 
@@ -335,10 +325,6 @@ sub PollEventLoop {
 
             $pob = $DescriptorMap{$fd};
 
-            if (!$pob) {
-                next;
-            }
-
             $pob->event_read   if $state & POLLIN && ! $pob->{closed};
             $pob->event_write  if $state & POLLOUT && ! $pob->{closed};
             $pob->event_err    if $state & POLLERR && ! $pob->{closed};
@@ -371,11 +357,6 @@ sub KQueueEventLoop {
         foreach my $kev (@ret) {
             my ($fd, $filter, $flags, $fflags) = @$kev;
             my PublicInbox::DS $pob = $DescriptorMap{$fd};
-            if (!$pob) {
-                warn "kevent() returned fd $fd for which we have no mapping.  removing.\n";
-                POSIX::close($fd); # close deletes the kevent entry
-                next;
-            }
 
             DebugLevel >= 1 && $class->DebugMsg("Event: fd=%d (%s), flags=%d \@ %s\n",
                                                         $fd, ref($pob), $flags, time);