diff options
Diffstat (limited to 'benchmark/dgram/multi-buffer.js')
-rw-r--r-- | benchmark/dgram/multi-buffer.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmark/dgram/multi-buffer.js b/benchmark/dgram/multi-buffer.js index 3277547119c..6a7fc9bfaf8 100644 --- a/benchmark/dgram/multi-buffer.js +++ b/benchmark/dgram/multi-buffer.js @@ -45,9 +45,11 @@ function server() { var socket = dgram.createSocket('udp4'); function onsend() { - if (sent++ % num === 0) - for (var i = 0; i < num; i++) + if (sent++ % num === 0) { + for (var i = 0; i < num; i++) { socket.send(chunk, PORT, '127.0.0.1', onsend); + } + } } socket.on('listening', function() { |