Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
benchmark: fix net/dgram.js infinite loop
  • Loading branch information
yosuke-furukawa committed Jan 17, 2015
commit 1258962fee315d1524b05991fb9cbea3701e626f
2 changes: 1 addition & 1 deletion benchmark/net/dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function server() {
function onsend() {
if (sent++ % num == 0)
for (var i = 0; i < num; i++)
socket.send(chunk, 0, chunk.length, PORT, '127.0.0.1', onsend);
socket.send(chunk, 0, chunk.length, PORT, '127.0.0.1', setImmediate(onsend));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be like setImmediate.bind(null, onsend) ?

}

socket.on('listening', function() {
Expand Down