diff --git a/src/tools/hexnet.cpp b/src/tools/hexnet.cpp index e03da34..9088353 100644 --- a/src/tools/hexnet.cpp +++ b/src/tools/hexnet.cpp @@ -114,6 +114,26 @@ void signalHandler(int signal) { tcpSocket.shutdown(SHUT_RD); } + if (tcpConnector) { + tcpConnector.shutdown(SHUT_RD); + } + + if (tcp6Socket) { + tcp6Socket.shutdown(SHUT_RD); + } + + if (tcp6Connector) { + tcp6Connector.shutdown(SHUT_RD); + } + + if (udpSocket) { + udpSocket.shutdown(SHUT_RD); + } + + if (udp6Socket) { + udp6Socket.shutdown(SHUT_RD); + } + std::cerr << "Received signal " << signal << ", bye!" << std::endl; std::exit(EXIT_SIGNAL); }