Skip to content

Commit

Permalink
http: remove redundant call to socket.setTimeout()
Browse files Browse the repository at this point in the history
`Socket.prototype.setTimeout()` clears the previous timer before setting
a new one.

Refs: nodejs#25748 (comment)
  • Loading branch information
lpinca committed Feb 4, 2019
1 parent c6ecbd3 commit bdd2da2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ function resOnFinish(req, res, socket, state, server) {
}
} else if (state.outgoing.length === 0) {
if (server.keepAliveTimeout && typeof socket.setTimeout === 'function') {
socket.setTimeout(0);
socket.setTimeout(server.keepAliveTimeout);
state.keepAliveTimeoutSet = true;
}
Expand Down

0 comments on commit bdd2da2

Please sign in to comment.