MINOR: proto-tcp: make use of connect(AF_UNSPEC) for the pause
authorWilly Tarreau <w@1wt.eu>
Tue, 13 Oct 2020 14:34:19 +0000 (16:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 13 Oct 2020 16:15:33 +0000 (18:15 +0200)
commit8b6fc3d10e6319821353095d56b0c6a8c70f2713
tree394ef2ce8ef6b292d8a06b902108bfb90d0aa8f0
parent7c9f756dcc51b9974d5e81116e1d8a34a6152040
MINOR: proto-tcp: make use of connect(AF_UNSPEC) for the pause

Currently the suspend/resume mechanism for listeners only works on Linux
and we resort to a number of tricks involving shutdown+listen+shutdown
to try to detect failures on other operating systems that do not support
it. But on Linux connect(AF_UNSPEC) also works pretty well and is much
cleaner. It still doesn't work on other operating systems but the error
is easier to detect and appears safer. So let's switch to this.
src/proto_tcp.c