]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: dclose: do not EPOLL_CTL_DEL w/o event_init
authorEric Wong <e@80x24.org>
Thu, 4 Mar 2021 09:03:12 +0000 (17:03 +0800)
committerEric Wong <e@80x24.org>
Thu, 4 Mar 2021 18:29:38 +0000 (14:29 -0400)
It's possible we'll hit a die() statement which triggers
lei->dclose, but aren't in the event loop, yet.

lib/PublicInbox/LEI.pm

index 1e5b04cac3bdf5bb896daf1184852fe214e84b70..fdd9f8c86231cb95a6c3e6b4d7a87c5753b791b8 100644 (file)
@@ -973,7 +973,7 @@ sub dclose {
        if (my $sto = delete $self->{sto}) {
                $sto->ipc_do('done');
        }
-       $self->close if $self->{sock}; # PublicInbox::DS::close
+       $self->close if $self->{-event_init_done}; # PublicInbox::DS::close
 }
 
 # for long-running results