Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Oct 18, 2024
1 parent 29362f6 commit 1f3ce0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/node/http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,6 @@ function markStreamClosed(stream: Http2Stream) {

if ((status & StreamState.Closed) === 0) {
stream[bunHTTP2StreamStatus] = status | StreamState.Closed;

markWritableDone(stream);
}
}
Expand Down Expand Up @@ -2325,7 +2324,6 @@ class ServerHttp2Session extends Http2Session {
) {
if (!self || typeof stream !== "object") return;
const headers = toHeaderObject(rawheaders, sensitiveHeadersValue || []);

const status = stream[bunHTTP2StreamStatus];
if ((status & StreamState.StreamResponded) !== 0) {
stream.emit("trailers", headers, flags, rawheaders);
Expand Down Expand Up @@ -2411,6 +2409,7 @@ class ServerHttp2Session extends Http2Session {
if (parser) {
h2EmitAbortToAllStreams(parser);
h2Detach(parser);
this[bunHTTP2Socket]?.removeAllListeners();
this[bunHTTP2Parser] = null;
}
this.close();
Expand Down Expand Up @@ -2625,6 +2624,7 @@ class ServerHttp2Session extends Http2Session {
if (parser) {
h2EmitErrorToAllStreams(code || constants.NGHTTP2_NO_ERROR);
h2Detach(parser);
this[bunHTTP2Socket]?.removeAllListeners();
this[bunHTTP2Parser] = null;
}
this[bunHTTP2Socket] = null;
Expand Down Expand Up @@ -2857,12 +2857,14 @@ class ClientHttp2Session extends Http2Session {
if (parser) {
h2EmitAbortToAllStreams(parser);
h2Detach(parser);
this[bunHTTP2Socket]?.removeAllListeners();
this[bunHTTP2Parser] = null;
}
this.close();
this[bunHTTP2Socket] = null;
}
#onError(error: Error) {
this[bunHTTP2Socket]?.removeAllListeners();
this[bunHTTP2Socket] = null;
this.destroy(error);
}
Expand Down Expand Up @@ -3085,6 +3087,7 @@ class ClientHttp2Session extends Http2Session {
if (parser) {
h2EmitErrorToAllStreams(parser, code || constants.NGHTTP2_NO_ERROR);
h2Detach(parser);
this[bunHTTP2Socket]?.removeAllListeners();
}
this[bunHTTP2Parser] = null;
this[bunHTTP2Socket] = null;
Expand Down

0 comments on commit 1f3ce0d

Please sign in to comment.