You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TCP is fun. If the server initiates the closing of the TCP connection
the socket needs to stay alive for some time according to the protocol
so that out-of-order and delayed packets have a chance to arrive. When
the simulator gets shut down those packets doesn't matter. Luckily there
is a way around, by setting SO_LINGER on the socket the connection is
closed with a "RESET" instead and the socket is immediately released in
the OS.
This commit also switches from signal(2) to sigaction(2) so that we can
avoid setting SA_RESTART so that signals interrupt blocking syscalls
like read.
It also introduces support for "SIGHUP" that can be used to simply
disconnect the client.
0 commit comments