File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { ConnectivityState } from './connectivity-state';
26
26
import { ConfigSelector , createResolver , Resolver } from './resolver' ;
27
27
import { ServiceError } from './call' ;
28
28
import { Picker , UnavailablePicker , QueuePicker } from './picker' ;
29
- import { BackoffTimeout } from './backoff-timeout' ;
29
+ import { BackoffOptions , BackoffTimeout } from './backoff-timeout' ;
30
30
import { Status } from './constants' ;
31
31
import { StatusObject } from './call-stream' ;
32
32
import { Metadata } from './metadata' ;
@@ -248,15 +248,18 @@ export class ResolvingLoadBalancer implements LoadBalancer {
248
248
} ,
249
249
channelOptions
250
250
) ;
251
-
251
+ const backoffOptions : BackoffOptions = {
252
+ initialDelay : channelOptions [ 'grpc.initial_reconnect_backoff_ms' ] ,
253
+ maxDelay : channelOptions [ 'grpc.max_reconnect_backoff_ms' ] ,
254
+ } ;
252
255
this . backoffTimeout = new BackoffTimeout ( ( ) => {
253
256
if ( this . continueResolving ) {
254
257
this . updateResolution ( ) ;
255
258
this . continueResolving = false ;
256
259
} else {
257
260
this . updateState ( this . latestChildState , this . latestChildPicker ) ;
258
261
}
259
- } ) ;
262
+ } , backoffOptions ) ;
260
263
this . backoffTimeout . unref ( ) ;
261
264
}
262
265
You can’t perform that action at this time.
0 commit comments