diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-04-13 16:31:57 +0200 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-08-04 11:56:12 -0700 |
commit | 11e42492278ed5d4a47f823ff6c577783eec672a (patch) | |
tree | ea73b5a767ed0baa5662a8c5484916cf028cd51f /lib | |
parent | ef2c8cd4ece424bf02048921b6709da411301c59 (diff) | |
download | android-node-v8-11e42492278ed5d4a47f823ff6c577783eec672a.tar.gz android-node-v8-11e42492278ed5d4a47f823ff6c577783eec672a.tar.bz2 android-node-v8-11e42492278ed5d4a47f823ff6c577783eec672a.zip |
http_server: `prefinish` vs `finish`
Do not detach the socket from the response until all data is actually
sent to the other side.
See: https://github.com/iojs/io.js/pull/1373
PR-URL: https://github.com/nodejs/io.js/pull/1411
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_http_server.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_http_server.js b/lib/_http_server.js index b696b9bc0c..59ea2bdda4 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -431,7 +431,7 @@ function connectionListener(socket) { // When we're finished writing the response, check if this is the last // respose, if so destroy the socket. - res.on('prefinish', resOnFinish); + res.on('finish', resOnFinish); function resOnFinish() { // Usually the first incoming element should be our request. it may // be that in the case abortIncoming() was called that the incoming |