http, stream: writeHWM -> writableHighWaterMark

See: https://github.com/nodejs/node/pull/12860#pullrequestreview-76800871

PR-URL: https://github.com/nodejs/node/pull/17050
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Matteo Collina 2017-11-15 15:48:49 +01:00
parent 157df5a47c
commit 3eb5778d1b

View File

@ -373,13 +373,13 @@ function connectionListener(socket) {
function updateOutgoingData(socket, state, delta) {
state.outgoingData += delta;
if (socket._paused &&
state.outgoingData < socket.writeHWM) {
state.outgoingData < socket.writableHighWaterMark) {
return socketOnDrain(socket, state);
}
}
function socketOnDrain(socket, state) {
var needPause = state.outgoingData > socket.writeHWM;
var needPause = state.outgoingData > socket.writableHighWaterMark;
// If we previously paused, then start reading again.
if (socket._paused && !needPause) {