Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
[Perf local_lat]Don't close the socket immediately
Browse files Browse the repository at this point in the history
Closing the socket to fast may lead to data to be not send.
  • Loading branch information
maxired committed Jan 13, 2015
1 parent f15b066 commit 68c1770
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion perf/local_lat.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ rep.bindSync(bind_to);
rep.on('message', function (data) {
assert.equal(data.length, message_size, 'message-size did not match');
rep.send(data);
if (++counter === roundtrip_count) rep.close();
if (++counter === roundtrip_count){
setTimeout( function(){
rep.close();
}, 1000);
}
})

0 comments on commit 68c1770

Please sign in to comment.