]> Sergey Matveev's repositories - public-inbox.git/commit
ds: handle deferred DS->close after timers
authorEric Wong <e@80x24.org>
Fri, 28 Jun 2019 05:25:40 +0000 (05:25 +0000)
committerEric Wong <e@80x24.org>
Sat, 29 Jun 2019 19:59:00 +0000 (19:59 +0000)
commit7c83d3e706811095cedab0bf62ac530d7b0f3a5a
tree14492c1fd2e0f567b70e691ffd75fb88a28a238c
parente37ac4015fa6f9616c845a73abc36ec5a21d57a7
ds: handle deferred DS->close after timers

Our hacks in EvCleanup::next_tick and EvCleanup::asap were due
to the fact "closed" sockets were deferred and could not wake
up the event loop, causing certain actions to be delayed until
an event fired.

Instead, ensure we don't sleep if there are pending sockets to
close.

We can then remove most of the EvCleanup stuff

While we're at it, split out immediate timer handling into a
separate array so we don't need to deal with time calculations
for the event loop.
lib/PublicInbox/DS.pm
lib/PublicInbox/EvCleanup.pm
lib/PublicInbox/HTTP.pm
lib/PublicInbox/HTTPD/Async.pm
lib/PublicInbox/NNTP.pm