File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ import { partialClone } from './utilities/collectionUtils'
3636import { selectFrom } from './utilities/tsUtils'
3737import { once } from './utilities/functionUtils'
3838import { isWeb } from './extensionGlobals'
39- import { NodeHttpHandler } from '@smithy/node-http-handler'
4039
4140export type AwsClientConstructor < C > = new ( o : AwsClientOptions ) => C
4241
@@ -94,9 +93,14 @@ export class AWSClientBuilderV3 {
9493
9594 private buildHttpClient ( ) {
9695 const requestTimeout = 30000
96+ // HACK: avoid importing node-http-handler on web.
9797 return isWeb ( )
9898 ? new FetchHttpHandler ( { keepAlive : true , requestTimeout } )
99- : new NodeHttpHandler ( { httpAgent : { keepAlive : true } , httpsAgent : { keepAlive : true } , requestTimeout } )
99+ : new ( require ( '@smithy/node-http-handler' ) . NodeHttpHandler ) ( {
100+ httpAgent : { keepAlive : true } ,
101+ httpsAgent : { keepAlive : true } ,
102+ requestTimeout,
103+ } )
100104 }
101105
102106 private getHttpClient = once ( this . buildHttpClient . bind ( this ) )
You can’t perform that action at this time.
0 commit comments