commit | ad38acedaa7b5bd0f6c2f4d5816b331f35b7d07e | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun Dec 15 14:19:38 2013 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Dec 16 02:23:52 2013 +0100 |
tree | 5abc291852c505833d7fa5524ec98200760c9628 | |
parent | d02cdd23be5f742408082bb04d4a387ee3b3b473 [diff] |
MEDIUM: connection: centralize handling of nolinger in fd management Right now we see many places doing their own setsockopt(SO_LINGER). Better only do it just before the close() in fd_delete(). For this we add a new flag on the file descriptor, indicating if it's safe or not to linger. If not (eg: after a connect()), then the setsockopt() call is automatically performed before a close(). The flag automatically turns to safe when receiving a read0.