File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import { ChannelOptions } from './channel-options';
21
21
22
22
class UdsResolver implements Resolver {
23
23
private addresses : SubchannelAddress [ ] = [ ] ;
24
+ private hasReturnedResult = false ;
24
25
constructor (
25
26
target : GrpcUri ,
26
27
private listener : ResolverListener ,
@@ -35,14 +36,17 @@ class UdsResolver implements Resolver {
35
36
this . addresses = [ { path } ] ;
36
37
}
37
38
updateResolution ( ) : void {
38
- process . nextTick (
39
- this . listener . onSuccessfulResolution ,
40
- this . addresses ,
41
- null ,
42
- null ,
43
- null ,
44
- { }
45
- ) ;
39
+ if ( ! this . hasReturnedResult ) {
40
+ this . hasReturnedResult = true ;
41
+ process . nextTick (
42
+ this . listener . onSuccessfulResolution ,
43
+ this . addresses ,
44
+ null ,
45
+ null ,
46
+ null ,
47
+ { }
48
+ ) ;
49
+ }
46
50
}
47
51
48
52
destroy ( ) {
You can’t perform that action at this time.
0 commit comments