diff options
Diffstat (limited to 'cli/bench/http/deno_http_flash_ops.js')
-rw-r--r-- | cli/bench/http/deno_http_flash_ops.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/bench/http/deno_http_flash_ops.js b/cli/bench/http/deno_http_flash_ops.js index 1b833e7f7..40ca25ff1 100644 --- a/cli/bench/http/deno_http_flash_ops.js +++ b/cli/bench/http/deno_http_flash_ops.js @@ -25,13 +25,15 @@ function respond(token, response) { const response = encode( "HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\nHello World", ); +let offset = 0; while (true) { let token = nextRequest(); if (token === 0) token = await opAsync("op_flash_next_async", serverId); - for (let i = 0; i < token; i++) { + for (let i = offset; i < offset + token; i++) { respond( i, response, ); } + offset += token; } |