http_server: pause socket properly
authorFedor Indutny <fedor@indutny.com>
Sat, 3 Oct 2015 19:27:19 +0000 (15:27 -0400)
committerRod Vagg <rod@vagg.org>
Mon, 5 Oct 2015 11:33:41 +0000 (22:33 +1100)
commitfb7a491d1c781c20e88b48214cda12a1048ee812
tree2bb0d1ef2b6a84543a0190ccfc7af86a849394ad
parent99943e189d7abd978cc7798bf768c4487920b365
http_server: pause socket properly

Account pending response data to decide whether pause the socket or
not. Writable stream state is a not reliable measure, because it just
says how much data is pending on a **current** request, thus not helping
much with problem we are trying to solve here.

PR-URL: https://github.com/nodejs/node/pull/3128
lib/_http_outgoing.js
lib/_http_server.js