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

Commit

Permalink
Fix race condition in test-dgram-pingpong
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 21, 2011
1 parent 84d0b1b commit fafb584
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/simple/test-dgram-pingpong.js
Expand Up @@ -71,8 +71,7 @@ function pingPongTest(port, host) {
client.send(buf, 0, buf.length, port, 'localhost');
} else {
sent_final_ping = true;
client.send(buf, 0, buf.length, port, 'localhost');
process.nextTick(function() {
client.send(buf, 0, buf.length, port, 'localhost', function() {
client.close();
});
}
Expand Down

0 comments on commit fafb584

Please sign in to comment.