@@ -567,7 +567,7 @@ export class RealtimeHandler {
567
567
* <p>If the connection is successful, this method will block on its thread while it reads the
568
568
* chunk-encoded HTTP body. When the connection closes, it attempts to reestablish the stream.
569
569
*/
570
- private async beginRealtimeHttpStream ( ) : Promise < void > {
570
+ private async prepareAndBeginRealtimeHttpStream ( ) : Promise < void > {
571
571
if ( ! this . checkAndSetHttpConnectionFlagIfNotRunning ( ) ) {
572
572
return ;
573
573
}
@@ -668,7 +668,7 @@ export class RealtimeHandler {
668
668
if ( this . httpRetriesRemaining > 0 ) {
669
669
this . httpRetriesRemaining -- ;
670
670
await new Promise ( resolve => setTimeout ( resolve , delayMillis ) ) ;
671
- await this . beginRealtimeHttpStream ( ) ;
671
+ await this . prepareAndBeginRealtimeHttpStream ( ) ;
672
672
} else if ( ! this . isInBackground ) {
673
673
const error = ERROR_FACTORY . create ( ErrorCode . CONFIG_UPDATE_STREAM_ERROR , {
674
674
originalErrorMessage :
@@ -688,9 +688,9 @@ export class RealtimeHandler {
688
688
* Adds an observer to the realtime updates.
689
689
* @param observer The observer to add.
690
690
*/
691
- async addObserver ( observer : ConfigUpdateObserver ) : Promise < void > {
691
+ addObserver ( observer : ConfigUpdateObserver ) : void {
692
692
this . observers . add ( observer ) ;
693
- await this . beginRealtime ( ) ;
693
+ void this . beginRealtime ( ) ;
694
694
}
695
695
696
696
/**
0 commit comments