From d74c4c9c2802b88a627dbc55e8e10cbc57e82b1d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 4 Mar 2021 17:03:12 +0800 Subject: lei: dclose: do not EPOLL_CTL_DEL w/o event_init 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 1e5b04ca..fdd9f8c8 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -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 -- cgit v1.2.3-24-ge0c7