From 13a497912d71b516352599e36f7172e654c3aec4 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 6 Aug 2019 18:21:48 +0200 Subject: [PATCH] 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 Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat Reviewed-By: Rich Trott --- lib/_http_server.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/_http_server.js b/lib/_http_server.js index a23943970dfa4d..0dd789e714fbbb 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -444,13 +444,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) {