Skip to content

Commit 03c98d5

Browse files
authored
fix: bad respond on h2 server (#3978)
1 parent e51df14 commit 03c98d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

benchmarks/server-http2.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ if (cluster.isPrimary) {
4040

4141
server.on('stream', (stream) => {
4242
setTimeout(() => {
43-
stream.respond({
44-
'content-type': 'text/plain; charset=utf-8',
45-
':status': 200
46-
})
47-
4843
stream.setEncoding('utf-8').end(buf)
4944
}, timeout)
45+
46+
stream.respond({
47+
'content-type': 'text/plain; charset=utf-8',
48+
':status': 200
49+
})
5050
})
5151

5252
server.keepAliveTimeout = 600e3

0 commit comments

Comments
 (0)