Browse Source
HPCC-17088 Force shutdown() in cancel_accept if not in accept state
If a socket is used to wait on data (wait_read) then accept(),
the chances are a cancel_accept() call on another thread will not
catch the socket in accept state.
Closing the socket, does not cause wait_read/poll to notice.
shutdown() does.
This was noticed in dafilesrv when it receives a stop command.
The consequence of the wait_read not noticing the close() was
that dafilesrv did not stop until the wait_read timeout (60s)
had expired.
Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>