Ver Fonte

Reset userDisconnected value to false after reconnecting (#347)

Vladyslav Batyrenko há 2 anos atrás
pai
commit
67a9b6a60d
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      gramjs/network/MTProtoSender.ts

+ 1 - 1
gramjs/network/MTProtoSender.ts

@@ -270,6 +270,7 @@ export class MTProtoSender {
                 await sleep(this._delay);
             }
         }
+        this.userDisconnected = false;
         this.isConnecting = false;
         return true;
     }
@@ -480,7 +481,6 @@ export class MTProtoSender {
         let message;
 
         while (this._userConnected && !this._reconnecting) {
-            // this._log.debug('Receiving items from the network...');
             this._log.debug("Receiving items from the network...");
             try {
                 body = await this._connection!.recv();