Browse Source

Always send disconnect message if connected

Danilo Bargen 7 years ago
parent
commit
7b6d87850f
1 changed files with 1 additions and 1 deletions
  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});
         }