Skip to content

Commit

Permalink
check closed
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Oct 11, 2024
1 parent 96d7c22 commit 0ae142a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/node/http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ class Http2Stream extends Duplex {
sendTrailers(headers) {
const session = this[bunHTTP2Session];

if (this.destroyed) {
if (this.destroyed || this.closed) {
const error = new Error(`ERR_HTTP2_INVALID_STREAM: The stream has been destroyed`);
error.code = "ERR_HTTP2_INVALID_STREAM";
throw error;
Expand Down

0 comments on commit 0ae142a

Please sign in to comment.