lib/PublicInbox/DS.pm | 4 +++- diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 40994fd44a085f286f13eb8126c69d98d1717747..2d312f0ac15084fe6b295351748d481a013d8ac9 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -271,6 +271,7 @@ sub EventLoop { $Epoll //= _InitPoller(); local $in_loop = 1; my @events; + my $obj; # guard stack-not-refcounted w/ Carp + @DB::args do { my $timeout = RunTimers(); @@ -281,7 +282,8 @@ # it's possible epoll_wait returned many events, including some at the end # that ones in the front triggered unregister-interest actions. if we # can't find the %sock entry, it's because we're no longer interested # in that event. - $DescriptorMap{$fd}->event_step; + $obj = $DescriptorMap{$fd}; + $obj->event_step; } } while (PostEventLoop()); _run_later();