Skip to content
Snippets Groups Projects
Commit a0b4a7cf authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Perform super-graceful shutdown of the socket on success.

This should guard against a RST being sent on success.  It's possible
that the remote has sent data (ie: M_EOB) we would recv() after we
commit to ending the session.  If the script terminates while there
is data to be read, this would result in sending a RST.

To prevent this, we call shutdown(sock, SHUT_WR) via setting is_writeable
to false (because that's how we roll), then recv() all data until the
remote closes the session, or the timeout passes.
parent 1ea3f277
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #919 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment