fix: rename variable and use nullish coalesce

This commit is contained in:
Ricki Hastings 2025-01-02 08:56:53 +00:00
parent d08318d8c1
commit a0914c6cda
3 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ Many channel arguments supported in `grpc` are not supported in `@grpc/grpc-js`.
- `grpc-node.max_session_memory`
- `grpc-node.tls_enable_trace`
- `grpc-node.retry_max_attempts_limit`
- `grpc-node.http2_initial_window_size`
- `grpc-node.flow_control_window`
- `channelOverride`
- `channelFactoryOverride`

View File

@ -64,7 +64,7 @@ export interface ChannelOptions {
'grpc-node.tls_enable_trace'?: number;
'grpc.lb.ring_hash.ring_size_cap'?: number;
'grpc-node.retry_max_attempts_limit'?: number;
'grpc-node.http2_initial_window_size'?: number;
'grpc-node.flow_control_window'?: number;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
}

View File

@ -675,7 +675,7 @@ export class Http2SubchannelConnector implements SubchannelConnector {
},
settings: {
initialWindowSize:
options['grpc-node.http2_initial_window_size'] ||
options['grpc-node.flow_control_window'] ??
http2.getDefaultSettings().initialWindowSize,
}
});