Fix race condition in test-dgram-pingpong

This commit is contained in:
Ryan Dahl
2011-10-21 10:21:23 -07:00
parent 84d0b1bcc5
commit fafb584881

View File

@@ -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();
});
}