MEDIUM: listeners: make use of fd_want_recv_safe() to enable early receivers
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2020 12:59:04 +0000 (13:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2020 13:22:42 +0000 (14:22 +0100)
commita4380b211f629237e7ccf22d30bb76ad091ad5f3
tree0f675d61fa9783f11a8c4dfa3390093dc582f6e0
parent7e98e28eb06f907fc3a7a5599b74d5d85b98d9ca
MEDIUM: listeners: make use of fd_want_recv_safe() to enable early receivers

We used to refrain from calling fd_want_recv() if fd_updt was not allocated
but it's not the right solution as this does not allow the FD to be set.
Instead, let's use the new fd_want_recv_safe() which will update the FD and
create an update entry only if possible. In addition, the equivalent test
before calling fd_stop_recv() was removed as totally useless since there's
not fd_updt creation in this case.
src/proto_sockpair.c
src/proto_tcp.c
src/proto_udp.c
src/proto_uxst.c
src/sock.c