diff --git a/src/protocol/connect.c b/src/protocol/connect.c index dc321be..8d365fc 100644 --- a/src/protocol/connect.c +++ b/src/protocol/connect.c @@ -40,6 +40,8 @@ int bind_server(void) { if (sock < 0) return -1; + nn_setsockopt(sock, NN_SOL_SOCKET, NN_LINGER, &(int) {-1}, sizeof (int)); + if (nn_bind(sock, URL) < 0) goto error; @@ -58,6 +60,8 @@ int connect_client(void) { if (sock < 0) return -1; + nn_setsockopt(sock, NN_SOL_SOCKET, NN_LINGER, &(int) {-1}, sizeof (int)); + if (nn_connect (sock, URL) < 0) goto error;