From 7635b7cc27305dbe11112771d6f7c52b3c401db8 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 4a964660903def..b01759e9a5b729 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -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) {