From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8BBD21F9FF for ; Thu, 4 Mar 2021 09:03:16 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/6] lei: dclose: do not EPOLL_CTL_DEL w/o event_init Date: Thu, 4 Mar 2021 17:03:12 +0800 Message-Id: <20210304090316.9568-3-e@80x24.org> In-Reply-To: <20210304090316.9568-1-e@80x24.org> References: <20210304090316.9568-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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