File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -695,16 +695,17 @@ export class Http2SubchannelConnector implements SubchannelConnector {
695695 reject ( `${ errorMessage } (${ new Date ( ) . toISOString ( ) } )` ) ;
696696 }
697697 } ;
698- const session = http2 . connect ( ` ${ scheme } :// ${ targetPath } ` , {
698+ const sessionOptions : http2 . ClientSessionOptions = {
699699 createConnection : ( authority , option ) => {
700700 return secureConnectResult . socket ;
701- } ,
702- settings : {
703- initialWindowSize :
704- options [ 'grpc-node.flow_control_window' ] ??
705- http2 . getDefaultSettings ( ) . initialWindowSize ,
706701 }
707- } ) ;
702+ } ;
703+ if ( options [ 'grpc-node.flow_control_window' ] !== undefined ) {
704+ sessionOptions . settings = {
705+ initialWindowSize : options [ 'grpc-node.flow_control_window' ]
706+ } ;
707+ }
708+ const session = http2 . connect ( `${ scheme } ://${ targetPath } ` , sessionOptions ) ;
708709 this . session = session ;
709710 let errorMessage = 'Failed to connect' ;
710711 let reportedError = false ;
You can’t perform that action at this time.
0 commit comments