protocol: Added infinite lingering

This commit is contained in:
Snaipe 2016-05-18 23:48:06 +02:00
parent cdcea14156
commit 9462d1a97f

View file

@ -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;