chore: fix code style

---------

Signed-off-by: Andy Pan <i@andypan.me>
This commit is contained in:
Andy Pan 2025-05-21 08:39:06 +08:00
parent a38466737b
commit c3ac28021e

View File

@ -91,26 +91,26 @@ static int uv__tcp_keepalive(uv_tcp_t* handle,
* for TCP keepalive options. */
if (minimal_windows10_version1709()) {
if (setsockopt(socket,
IPPROTO_TCP,
TCP_KEEPIDLE,
(const char*)&idle,
sizeof idle) == -1) {
IPPROTO_TCP,
TCP_KEEPIDLE,
(const char*)&idle,
sizeof idle) == -1) {
return WSAGetLastError();
}
if (setsockopt(socket,
IPPROTO_TCP,
TCP_KEEPINTVL,
(const char*)&intvl,
sizeof intvl) == -1) {
IPPROTO_TCP,
TCP_KEEPINTVL,
(const char*)&intvl,
sizeof intvl) == -1) {
return WSAGetLastError();
}
if (setsockopt(socket,
IPPROTO_TCP,
TCP_KEEPCNT,
(const char*)&cnt,
sizeof cnt) == -1) {
IPPROTO_TCP,
TCP_KEEPCNT,
(const char*)&cnt,
sizeof cnt) == -1) {
return WSAGetLastError();
}