diff options
Diffstat (limited to 'benchmark/dgram/offset-length.js')
-rw-r--r-- | benchmark/dgram/offset-length.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmark/dgram/offset-length.js b/benchmark/dgram/offset-length.js index 5b7762b21e7..b897707ded5 100644 --- a/benchmark/dgram/offset-length.js +++ b/benchmark/dgram/offset-length.js @@ -37,9 +37,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, 0, chunk.length, PORT, '127.0.0.1', onsend); + } + } } socket.on('listening', function() { |