Skip to content

Commit d58fa78

Browse files
refackevanlucas
authored andcommitted
benchmark,windows: TCP.readStart() meaningful only after completion
fixes #11972 PR-URL: #12258 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f3db9a6 commit d58fa78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/net/tcp-raw-pipe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ function client() {
9797
if (err)
9898
fail(err, 'connect');
9999

100-
clientHandle.readStart();
101-
102100
clientHandle.onread = function(nread, buffer) {
103101
if (nread < 0)
104102
fail(nread, 'read');
@@ -112,6 +110,8 @@ function client() {
112110

113111
bench.start();
114112

113+
clientHandle.readStart();
114+
115115
setTimeout(function() {
116116
// multiply by 2 since we're sending it first one way
117117
// then then back again.

0 commit comments

Comments
 (0)