Skip to content

Commit ae63e78

Browse files
committed
tcp: workaround setkeepalive regression in libuv
1 parent 7c87e84 commit ae63e78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/streams.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static JSValue tjs_tcp_keepalive(JSContext *ctx, JSValueConst this_val, int argc
571571
if ((enable = JS_ToBool(ctx, argv[0])) == -1)
572572
return JS_EXCEPTION;
573573

574-
int r = uv_tcp_keepalive(&t->h.tcp, enable, 0);
574+
int r = uv_tcp_keepalive(&t->h.tcp, enable, 1 /* TODO: make delay configurable? */);
575575
if (r != 0 &&
576576
r != UV_EINVAL) // Filter out EINVAL: https://github.com/libuv/libuv/pull/3488#issuecomment-1057836172
577577
return tjs_throw_errno(ctx, r);

0 commit comments

Comments
 (0)