user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 4/6] ds: drop checks for invalid descriptors
  2019-06-03  1:52  7% [PATCH 0/6] ds: less is more Eric Wong
@ 2019-06-03  1:52  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-06-03  1:52 UTC (permalink / raw)
  To: meta

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.
---
 lib/PublicInbox/DS.pm | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index b2c4b44..e11b23d 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);
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/6] ds: less is more
@ 2019-06-03  1:52  7% Eric Wong
  2019-06-03  1:52  7% ` [PATCH 4/6] ds: drop checks for invalid descriptors Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-06-03  1:52 UTC (permalink / raw)
  To: meta

What's better than Free Software? Freedom FROM software!

Eric Wong (6):
  ds: drop more unused subs
  ds: add a note about planned future changes
  ds: drop set_writer_func support
  ds: drop checks for invalid descriptors
  ds: drop unused EVENT: label in epoll code path
  ds: drop write_set_watch field

 lib/PublicInbox/DS.pm        | 83 +++++-------------------------------
 lib/PublicInbox/EvCleanup.pm |  2 +-
 2 files changed, 12 insertions(+), 73 deletions(-)

-- 
EW

^ permalink raw reply	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-06-03  1:52  7% [PATCH 0/6] ds: less is more Eric Wong
2019-06-03  1:52  7% ` [PATCH 4/6] ds: drop checks for invalid descriptors Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).