Skip to content
Snippets Groups Projects
Commit c74584ed authored by Brian May's avatar Brian May
Browse files

Ensure optval is defined correctly before calling setsockopt.

parent 16ab4a45
No related branches found
No related tags found
No related merge requests found
...@@ -552,6 +552,7 @@ resetting counter\n"); ...@@ -552,6 +552,7 @@ resetting counter\n");
fanout_error ("epoll_ctl: srvsock"); fanout_error ("epoll_ctl: srvsock");
} }
optval = 1;
if ((setsockopt (client_i->fd, SOL_SOCKET, SO_KEEPALIVE, if ((setsockopt (client_i->fd, SOL_SOCKET, SO_KEEPALIVE,
&optval, optlen)) == -1) &optval, optlen)) == -1)
fanout_error ("failed setting keepalive"); fanout_error ("failed setting keepalive");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment