Skip to content

Commit

Permalink
fix: bad respond on h2 server
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 committed Dec 31, 2024
1 parent ad7ac02 commit ff80fe1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benchmarks/server-http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff80fe1

Please sign in to comment.