mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
When curl invokes the socket callback to tell us it only wants one polling direction (e.g. CURL_POLL_IN without CURL_POLL_OUT, or vice versa), we previously had no way to disable the other direction's notifier. Once created, a notifier stayed enabled and kept firing curl_multi_socket_action() for events curl was no longer interested in. Merge the read and write branches into a single helper that also disables the notifier for a direction when its CURL_POLL_* flag is absent from the mask. This measurably improves performance by avoiding redundant curl_multi_socket_action() calls on sockets curl has asked us to stop watching in a given direction.