From 3823705b72199c61e8ed96aabd34d21a63fe153c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Dec 2020 13:51:53 +0000 Subject: [PATCH] ds: clobber $in_loop first at reset This may help ensure DESTROY callbacks will see in_loop before the others. --- lib/PublicInbox/DS.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 4f1558c7..8a560ae8 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -66,8 +66,9 @@ Reset all state =cut sub Reset { + $in_loop = undef; # first in case DESTROY callbacks use this %DescriptorMap = (); - $in_loop = $wait_pids = $later_queue = $reap_armed = undef; + $wait_pids = $later_queue = $reap_armed = undef; $EXPMAP = {}; $nextq = $ToClose = $later_timer = $exp_timer = undef; $LoopTimeout = -1; # no timeout by default -- 2.44.0