Преглед на файлове

Always send disconnect message if connected

Danilo Bargen преди 7 години
родител
ревизия
7b6d87850f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/services/webclient.ts

+ 1 - 1
src/services/webclient.ts

@@ -600,7 +600,7 @@ export class WebClientService {
                 redirect: boolean = false): void {
         this.$log.info(this.logTag, 'Disconnecting...');
 
-        if (requestedByUs && this.stateService.rtcConnectionState === 'connected') {
+        if (requestedByUs && this.stateService.state === threema.GlobalConnectionState.Ok) {
             // Ask peer to disconnect too
             this.salty.sendApplicationMessage({type: 'disconnect', forget: deleteStoredData});
         }