File tree Expand file tree Collapse file tree
packages/node-http-handler/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @smithy/node-http-handler " : minor
3+ ---
4+
5+ destroy isolated http2 session and manage timeout
Original file line number Diff line number Diff line change @@ -251,9 +251,7 @@ export class NodeHttp2Handler implements HttpHandler<NodeHttp2HandlerOptions> {
251251
252252 // Ensure the isolated session is destroyed when the response body stream ends.
253253 // The stream "close" event (below) is the primary cleanup path, but it may not
254- // fire if the consumer never reads the body (e.g. deserialization error, dropped
255- // reference) or on certain Node.js versions/platforms. This provides a reliable
256- // secondary cleanup path.
254+ // fire if the consumer never reads the body. This provides a secondary cleanup path.
257255 clientHttp2Stream . on ( "end" , ( ) => {
258256 ref . destroy ( ) ;
259257 } ) ;
@@ -271,8 +269,7 @@ export class NodeHttp2Handler implements HttpHandler<NodeHttp2HandlerOptions> {
271269 }
272270 if ( ! fulfilled ) {
273271 // If the session was destroyed (e.g. by sessionTimeout) before the response
274- // arrived, this is a timeout — type it accordingly so the SDK retry logic
275- // can classify it as transient.
272+ // arrived, type it as a Timeout so the retry logic kicks in.
276273 const error = new Error ( "Unexpected error: http2 request did not get a response" ) ;
277274 if ( session . destroyed ) {
278275 error . name = "TimeoutError" ;
You can’t perform that action at this time.
0 commit comments