File tree 1 file changed +8
-10
lines changed
packages/firestore/src/remote
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -475,15 +475,7 @@ export abstract class PersistentStream<
475
475
this . stream = this . startRpc ( token ) ;
476
476
this . stream . onOpen ( ( ) => {
477
477
dispatchIfNotClosed ( ( ) => {
478
- debugAssert (
479
- this . state === PersistentStreamState . Starting ,
480
- 'Expected stream to be in state Starting, but was ' + this . state
481
- ) ;
482
- this . state = PersistentStreamState . Open ;
483
- return this . listener ! . onOpen ( ) ;
484
- } ) ;
485
-
486
- if ( this . healthCheck === null ) {
478
+ debugAssert ( this . healthCheck === null , 'Expected healthCheck to be null' ) ;
487
479
this . healthCheck = this . queue . enqueueAfterDelay (
488
480
this . healthTimerId ,
489
481
HEALTHY_TIMEOUT_MS ,
@@ -494,7 +486,13 @@ export abstract class PersistentStream<
494
486
return Promise . resolve ( ) ;
495
487
}
496
488
) ;
497
- }
489
+ debugAssert (
490
+ this . state === PersistentStreamState . Starting ,
491
+ 'Expected stream to be in state Starting, but was ' + this . state
492
+ ) ;
493
+ this . state = PersistentStreamState . Open ;
494
+ return this . listener ! . onOpen ( ) ;
495
+ } ) ;
498
496
} ) ;
499
497
this . stream . onClose ( ( error ?: FirestoreError ) => {
500
498
dispatchIfNotClosed ( ( ) => {
You can’t perform that action at this time.
0 commit comments