]> Sergey Matveev's repositories - public-inbox.git/commitdiff
evcleanup: do not create event loop if nothing was registered
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Fri, 2 Mar 2018 03:43:30 +0000 (03:43 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Fri, 2 Mar 2018 09:07:59 +0000 (09:07 +0000)
This was creating an unnecessary epoll descriptor via
Danga::Socket when using V2Writable to import a mbox.  That
said, there should probably be better way of detecting whether
or not we're inside a Danga::Socket event loop.

Fixes: 427245acacaf04a8
       ("evcleanup: ensure deferred close from timers are handled ASAP")

lib/PublicInbox/EvCleanup.pm

index 8ed5180b76953a12b8163447e6045b3d6cf08576..384efd3d57d4c7a9746a554ad8fbeb79bcfed3bc 100644 (file)
@@ -79,8 +79,8 @@ sub later ($) {
 
 END {
        _run_asap();
-       _run_next();
-       _run_later();
+       _run_all($nextq);
+       _run_all($laterq);
 }
 
 1;