Commit 9caa184fdb231d7d74d2a68dd40d1741810ecebe

Authored by Igor Kulikov
1 parent 32fcfc7a

UI: improve ws reconnect flow

@@ -115,14 +115,16 @@ export class TelemetryWebsocketService implements TelemetryService { @@ -115,14 +115,16 @@ export class TelemetryWebsocketService implements TelemetryService {
115 } 115 }
116 116
117 public update(subscriber: TelemetrySubscriber) { 117 public update(subscriber: TelemetrySubscriber) {
118 - subscriber.subscriptionCommands.forEach(  
119 - (subscriptionCommand) => {  
120 - if (subscriptionCommand.cmdId && subscriptionCommand instanceof EntityDataCmd) {  
121 - this.cmdsWrapper.entityDataCmds.push(subscriptionCommand); 118 + if (!this.isReconnect) {
  119 + subscriber.subscriptionCommands.forEach(
  120 + (subscriptionCommand) => {
  121 + if (subscriptionCommand.cmdId && subscriptionCommand instanceof EntityDataCmd) {
  122 + this.cmdsWrapper.entityDataCmds.push(subscriptionCommand);
  123 + }
122 } 124 }
123 - }  
124 - );  
125 - this.publishCommands(); 125 + );
  126 + this.publishCommands();
  127 + }
126 } 128 }
127 129
128 public unsubscribe(subscriber: TelemetrySubscriber) { 130 public unsubscribe(subscriber: TelemetrySubscriber) {