MINOR: fd: add fd_want_recv_safe()
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2020 12:52:22 +0000 (13:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2020 13:22:42 +0000 (14:22 +0100)
commit7e98e28eb06f907fc3a7a5599b74d5d85b98d9ca
tree5116a15ee5c8f164cfbf76713f3e5d2503c5b668
parent22ccd5ebaf10318f73ef9b9f999feebce6bc1f7f
MINOR: fd: add fd_want_recv_safe()

This does the same as fd_want_recv() except that it does check for
fd_updt[] to be allocated, as this may be called during early listener
initialization. Previously we used to check fd_updt[] before calling
fd_want_recv() but this is not correct since it does not update the
FD flags. This method will be safer.
include/haproxy/fd.h