diff options
author | Brian White <mscdex@mscdex.net> | 2017-05-13 10:07:44 -0400 |
---|---|---|
committer | Brian White <mscdex@mscdex.net> | 2017-05-26 06:35:36 -0400 |
commit | a10bdb51b18dfaad874f3702a1daea51ec2d4514 (patch) | |
tree | 0a98d96f3d591abcc2536d5c9d3644879ef0f90e /test/parallel/test-http-client-aborted-event.js | |
parent | 329b6e908c04031c5ee5c7adae56f8c1dbaf37c6 (diff) | |
download | android-node-v8-a10bdb51b18dfaad874f3702a1daea51ec2d4514.tar.gz android-node-v8-a10bdb51b18dfaad874f3702a1daea51ec2d4514.tar.bz2 android-node-v8-a10bdb51b18dfaad874f3702a1daea51ec2d4514.zip |
http: improve outgoing string write performance
PR-URL: https://github.com/nodejs/node/pull/13013
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http-client-aborted-event.js')
-rw-r--r-- | test/parallel/test-http-client-aborted-event.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-http-client-aborted-event.js b/test/parallel/test-http-client-aborted-event.js index a9036a927d..1e7feb7d58 100644 --- a/test/parallel/test-http-client-aborted-event.js +++ b/test/parallel/test-http-client-aborted-event.js @@ -2,9 +2,10 @@ const common = require('../common'); const http = require('http'); +let serverRes; const server = http.Server(function(req, res) { res.write('Part of my res.'); - res.destroy(); + serverRes = res; }); server.listen(0, common.mustCall(function() { @@ -13,6 +14,7 @@ server.listen(0, common.mustCall(function() { headers: { connection: 'keep-alive' } }, common.mustCall(function(res) { server.close(); + serverRes.destroy(); res.on('aborted', common.mustCall()); })); })); |