File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
packages/fetch-http-handler/src Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @smithy/fetch-http-handler " : patch
3
+ ---
4
+
5
+ move keepAliveSupport check to FetchHttpHandler constructor
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type FetchHttpHandlerConfig = FetchHttpHandlerOptions;
16
16
* Detection of keepalive support. Can be overridden for testing.
17
17
*/
18
18
export const keepAliveSupport = {
19
- supported : Boolean ( typeof Request !== " undefined" && "keepalive" in new Request ( "https://[::1]" ) ) ,
19
+ supported : undefined as undefined | boolean ,
20
20
} ;
21
21
22
22
/**
@@ -60,6 +60,11 @@ export class FetchHttpHandler implements HttpHandler<FetchHttpHandlerConfig> {
60
60
this . config = options ?? { } ;
61
61
this . configProvider = Promise . resolve ( this . config ) ;
62
62
}
63
+ if ( keepAliveSupport . supported === undefined ) {
64
+ keepAliveSupport . supported = Boolean (
65
+ typeof Request !== "undefined" && "keepalive" in new Request ( "https://[::1]" )
66
+ ) ;
67
+ }
63
68
}
64
69
65
70
destroy ( ) : void {
You can’t perform that action at this time.
0 commit comments