瀏覽代碼

fix(xmpp): allow to close the connection while connecting

User may decide to abort the connection while it's stuck at connecting.
tags/v0.0.2
paweldomas 7 年之前
父節點
當前提交
17ca8194eb
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. 1
    3
      modules/xmpp/xmpp.js

+ 1
- 3
modules/xmpp/xmpp.js 查看文件

@@ -429,9 +429,7 @@ export default class XMPP extends Listenable {
429 429
      * disconnect from the XMPP server (e.g. beforeunload, unload).
430 430
      */
431 431
     disconnect(ev) {
432
-        if (this.disconnectInProgress
433
-                || !this.connection
434
-                || !this.connection.connected) {
432
+        if (this.disconnectInProgress || !this.connection) {
435 433
             this.eventEmitter.emit(JitsiConnectionEvents.WRONG_STATE);
436 434
 
437 435
             return;

Loading…
取消
儲存