Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion benchmark/http/client-request-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function main(conf) {
var dur = +conf.dur;
var len = +conf.bytes;

var running = true;
var encoding;
var chunk;
switch (conf.type) {
Expand Down Expand Up @@ -52,7 +53,9 @@ function main(conf) {
function pummel() {
var req = http.request(options, function(res) {
nreqs++;
pummel(); // Line up next request.
if (running) {
pummel(); // Line up next request.
}
res.resume();
});
if (conf.method === 'write') {
Expand All @@ -65,5 +68,7 @@ function main(conf) {

function done() {
bench.end(nreqs);
server.close();
running = false;
}
}