]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: connection: only call ->wake() for connect() without I/O
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 16:45:21 +0000 (17:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 18:29:12 +0000 (19:29 +0100)
commit8de5c4fa15d612bd70456881f8fef13b8fe37e2a
treeae559002bfe2bc6133748f769d920760710d398a
parent4c69cff43832ebbb41325688145cfb986ad211f6
MEDIUM: connection: only call ->wake() for connect() without I/O

We used to call ->wake() for any I/O event for which there was no
subscriber. But this is a problem because this causes massive wake()
storms since we disabled fd_stop_recv() to save syscalls.

The only reason for the io_available condition is to detect that an
asynchronous connect() just finished and will not be handled by any
registered event handler. Since we now properly handle synchronous
connects, we can detect this situation by the fact that we had a
success on conn_fd_check() and no requested I/O took over.
src/connection.c