From 99b512e890bd424eaac8139a567733f03a7975a0 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Fri, 28 Oct 2011 20:09:03 -0300 Subject: [PATCH] Windows: use SO_KEEPALIVE instead of TCP_KEEPALIVE MinGW doesn't understand the latter. Closes GH-228. --- src/win/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win/tcp.c b/src/win/tcp.c index 1d18cdab..485d93da 100644 --- a/src/win/tcp.c +++ b/src/win/tcp.c @@ -71,7 +71,7 @@ static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsign if (enable && setsockopt(socket, IPPROTO_TCP, - TCP_KEEPALIVE, + SO_KEEPALIVE, (const char*)&delay, sizeof delay) == -1) { uv__set_sys_error(handle->loop, errno); @@ -1068,4 +1068,4 @@ int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid, } return 0; -} \ No newline at end of file +}