diff --git a/benchmarks/server-http2.js b/benchmarks/server-http2.js index 6e0424d4ea4..6baf5e264ff 100644 --- a/benchmarks/server-http2.js +++ b/benchmarks/server-http2.js @@ -40,13 +40,13 @@ if (cluster.isPrimary) { server.on('stream', (stream) => { setTimeout(() => { - stream.respond({ - 'content-type': 'text/plain; charset=utf-8', - ':status': 200 - }) - stream.setEncoding('utf-8').end(buf) }, timeout) + + stream.respond({ + 'content-type': 'text/plain; charset=utf-8', + ':status': 200 + }) }) server.keepAliveTimeout = 600e3