From 8d7bf62ff2714e699a9255b22b748958b7e85482 Mon Sep 17 00:00:00 2001
From: yflory <yann.flory@xwiki.com>
Date: Mon, 26 Aug 2019 18:53:49 +0200
Subject: [PATCH] Don't leave the channel twice in cryptget

---
 www/common/cryptget.js | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/www/common/cryptget.js b/www/common/cryptget.js
index 1fc248a19..f99a28a6c 100644
--- a/www/common/cryptget.js
+++ b/www/common/cryptget.js
@@ -16,11 +16,6 @@ define([
             var disconnect = Util.find(S, ['network', 'disconnect']);
             if (typeof(disconnect) === 'function') { disconnect(); }
         }
-        if (S.leave) {
-            try {
-                S.leave();
-            } catch (e) { console.log(e); }
-        }
         if (S.realtime && S.realtime.stop) {
             try {
                 S.realtime.stop();
@@ -70,7 +65,6 @@ define([
         config.onReady = function (info) {
             var rt = Session.session = info.realtime;
             Session.network = info.network;
-            Session.leave = info.leave;
             progress(1);
             finish(Session, void 0, rt.getUserDoc());
         };