keepalive swap interval and probes

The interval and probes members for setting keepalive options
per-connection on Linux were swapped.

Signed-off-by: Larry Hayes <lhayesg@gmail.com>
This commit is contained in:
Larry Hayes 2013-02-22 09:16:20 +08:00 committed by Andy Green
parent 8c8a8e149d
commit bb66ac6ec1

View file

@ -578,12 +578,12 @@ int lws_set_socket_options(struct libwebsocket_context *context, int fd)
(const void *)&optval, optlen) < 0)
return 1;
optval = context->ka_probes;
optval = context->ka_interval;
if (setsockopt(fd, IPPROTO_IP, TCP_KEEPINTVL,
(const void *)&optval, optlen) < 0)
return 1;
optval = context->ka_interval;
optval = context->ka_probes;
if (setsockopt(fd, IPPROTO_IP, TCP_KEEPCNT,
(const void *)&optval, optlen) < 0)
return 1;