diff --git a/benchmark/net/tcp-raw-pipe.js b/benchmark/net/tcp-raw-pipe.js index 0501d13f00c7f9..77d3553062ddae 100644 --- a/benchmark/net/tcp-raw-pipe.js +++ b/benchmark/net/tcp-raw-pipe.js @@ -97,8 +97,6 @@ function client() { if (err) fail(err, 'connect'); - clientHandle.readStart(); - clientHandle.onread = function(nread, buffer) { if (nread < 0) fail(nread, 'read'); @@ -112,6 +110,8 @@ function client() { bench.start(); + clientHandle.readStart(); + setTimeout(function() { // multiply by 2 since we're sending it first one way // then then back again.