Skip to content

Commit bdd2da2

Browse files
committed
http: remove redundant call to socket.setTimeout()
`Socket.prototype.setTimeout()` clears the previous timer before setting a new one. Refs: nodejs#25748 (comment)
1 parent c6ecbd3 commit bdd2da2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/_http_server.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ function resOnFinish(req, res, socket, state, server) {
598598
}
599599
} else if (state.outgoing.length === 0) {
600600
if (server.keepAliveTimeout && typeof socket.setTimeout === 'function') {
601-
socket.setTimeout(0);
602601
socket.setTimeout(server.keepAliveTimeout);
603602
state.keepAliveTimeoutSet = true;
604603
}

0 commit comments

Comments
 (0)