mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
handle disconnectListeners in reverse to allow listener removal in loop
This commit is contained in:
parent
fa92727ec7
commit
0a0e13eede
@ -646,7 +646,8 @@ export class Subchannel {
|
||||
this.transitionToState(
|
||||
[ConnectivityState.READY],
|
||||
ConnectivityState.TRANSIENT_FAILURE);
|
||||
for (const listener of this.disconnectListeners) {
|
||||
for (let i = this.disconnectListeners.length - 1; i >= 0; i--) {
|
||||
const listener = this.disconnectListeners[i];
|
||||
listener();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user