Skip to content

Commit

Permalink
http, stream: writeHWM -> writableHighWaterMark
Browse files Browse the repository at this point in the history
See: #12860 (review)

PR-URL: #17050
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
mcollina authored and MylesBorins committed Dec 11, 2017
1 parent edb9846 commit a6b6acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a6b6acb

Please sign in to comment.