Skip to content

Commit

Permalink
benchmark,windows: TCP.readStart() meaningful only after completion
Browse files Browse the repository at this point in the history
fixes #11972

PR-URL: #12258
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
refack committed Apr 14, 2017
1 parent ea44b8b commit fbe946b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmark/net/tcp-raw-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ function client() {
if (err)
fail(err, 'connect');

clientHandle.readStart();

clientHandle.onread = function(nread, buffer) {
if (nread < 0)
fail(nread, 'read');
Expand All @@ -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.
Expand Down

0 comments on commit fbe946b

Please sign in to comment.