Skip to content

Commit 9652680

Browse files
authored
Merge pull request #2933 from murgatroid99/grpc-js_channel_options_fix
grpc-js: Consistently reference the same options object in the channel constructor
2 parents b937786 + bdcbdf4 commit 9652680

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/grpc-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.13.1",
3+
"version": "1.13.2",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/internal-channel.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,16 @@ export class InternalChannel {
297297
/* The global boolean parameter to getSubchannelPool has the inverse meaning to what
298298
* the grpc.use_local_subchannel_pool channel option means. */
299299
this.subchannelPool = getSubchannelPool(
300-
(options['grpc.use_local_subchannel_pool'] ?? 0) === 0
300+
(this.options['grpc.use_local_subchannel_pool'] ?? 0) === 0
301301
);
302302
this.retryBufferTracker = new MessageBufferTracker(
303-
options['grpc.retry_buffer_size'] ?? DEFAULT_RETRY_BUFFER_SIZE_BYTES,
304-
options['grpc.per_rpc_retry_buffer_size'] ??
303+
this.options['grpc.retry_buffer_size'] ?? DEFAULT_RETRY_BUFFER_SIZE_BYTES,
304+
this.options['grpc.per_rpc_retry_buffer_size'] ??
305305
DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES
306306
);
307-
this.keepaliveTime = options['grpc.keepalive_time_ms'] ?? -1;
307+
this.keepaliveTime = this.options['grpc.keepalive_time_ms'] ?? -1;
308308
this.idleTimeoutMs = Math.max(
309-
options['grpc.client_idle_timeout_ms'] ?? DEFAULT_IDLE_TIMEOUT_MS,
309+
this.options['grpc.client_idle_timeout_ms'] ?? DEFAULT_IDLE_TIMEOUT_MS,
310310
MIN_IDLE_TIMEOUT_MS
311311
);
312312
const channelControlHelper: ChannelControlHelper = {
@@ -372,7 +372,7 @@ export class InternalChannel {
372372
this.resolvingLoadBalancer = new ResolvingLoadBalancer(
373373
this.target,
374374
channelControlHelper,
375-
options,
375+
this.options,
376376
(serviceConfig, configSelector) => {
377377
if (serviceConfig.retryThrottling) {
378378
RETRY_THROTTLER_MAP.set(

0 commit comments

Comments
 (0)