File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @grpc/grpc-js" ,
3
- "version" : " 1.5.6 " ,
3
+ "version" : " 1.5.7 " ,
4
4
"description" : " gRPC Library for Node - pure JS implementation" ,
5
5
"homepage" : " https://grpc.io/" ,
6
6
"repository" : " https://github.com/grpc/grpc-node/tree/master/packages/grpc-js" ,
Original file line number Diff line number Diff line change @@ -669,9 +669,15 @@ export class Subchannel {
669
669
switch ( newState ) {
670
670
case ConnectivityState . READY :
671
671
this . stopBackoff ( ) ;
672
- this . session ! . socket . once ( 'close' , ( ) => {
673
- for ( const listener of this . disconnectListeners ) {
674
- listener ( ) ;
672
+ const session = this . session ! ;
673
+ session . socket . once ( 'close' , ( ) => {
674
+ if ( this . session === session ) {
675
+ this . transitionToState (
676
+ [ ConnectivityState . READY ] ,
677
+ ConnectivityState . TRANSIENT_FAILURE ) ;
678
+ for ( const listener of this . disconnectListeners ) {
679
+ listener ( ) ;
680
+ }
675
681
}
676
682
} ) ;
677
683
if ( this . keepaliveWithoutCalls ) {
You can’t perform that action at this time.
0 commit comments