0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

http: remove duplicate check

`socketOnDrain()` performs the exact same check and doesn't return
anything.

PR-URL: https://github.com/nodejs/node/pull/29022
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Robert Nagy 2019-08-06 18:21:48 +02:00 committed by Rich Trott
parent 9b221e533c
commit 7635b7cc27

View File

@ -441,13 +441,9 @@ function connectionListenerInternal(server, socket) {
socket._paused = false;
}
function updateOutgoingData(socket, state, delta) {
state.outgoingData += delta;
if (socket._paused &&
state.outgoingData < socket.writableHighWaterMark) {
return socketOnDrain(socket, state);
}
socketOnDrain(socket, state);
}
function socketOnDrain(socket, state) {