Windows: use SO_KEEPALIVE instead of TCP_KEEPALIVE
MinGW doesn't understand the latter. Closes GH-228.
This commit is contained in:
parent
ed2b5e60cb
commit
99b512e890
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user