From 845df3cd2ef23a0d3d703a07ff6102c8cd00cc04 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Thu, 27 Jan 2011 23:37:53 -0800 Subject: [PATCH] Slightly throttle https large body test --- test/simple/test-https-large-response.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/simple/test-https-large-response.js b/test/simple/test-https-large-response.js index ab80ba27b..36d78bbeb 100644 --- a/test/simple/test-https-large-response.js +++ b/test/simple/test-https-large-response.js @@ -23,7 +23,7 @@ var server = https.createServer(options, function (req, res) { console.log('got request'); res.writeHead(200, { 'content-type': 'text/plain' }); res.end(body); -}) +}); var count = 0; var gotResEnd = false; @@ -35,6 +35,10 @@ server.listen(common.PORT, function () { res.on('data', function(d) { process.stdout.write('.'); count += d.length; + res.pause(); + process.nextTick(function () { + res.resume(); + }); }); res.on('end', function(d) {