mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-28 16:40:37 +00:00
BUG/MINOR: listener/threads: always use atomic ops to clear the FD events
There was a leftover of the single-threaded era when removing the FD_POLL_HUP flag from the listeners. By not using an atomic operation to clear the flag, another thread acting on the same listener might have lost some events, though this would have resulted in that thread to reprocess them immediately on the next loop pass. This should be backported as far as 1.8.
This commit is contained in:
parent
67878d7bdc
commit
7cdeb61701
@ -799,7 +799,7 @@ void listener_accept(int fd)
|
||||
* a while in case it comes back. In the mean time, we need to
|
||||
* clear this sticky flag.
|
||||
*/
|
||||
fdtab[fd].ev &= ~FD_POLL_HUP;
|
||||
_HA_ATOMIC_AND(&fdtab[fd].ev, ~FD_POLL_HUP);
|
||||
goto transient_error;
|
||||
}
|
||||
fd_cant_recv(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user