From ff80fe1d58458190902d53749b9f041534a40c5e Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Tue, 31 Dec 2024 12:02:46 +0100 Subject: [PATCH] fix: bad respond on h2 server --- benchmarks/server-http2.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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