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 authored and evanlucas committed May 2, 2017
1 parent f3db9a6 commit d58fa78
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 d58fa78

Please sign in to comment.