diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-29 14:55:29 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-29 14:55:29 +0100 |
commit | 9c0c1da64a43e84edb74c696fb6ac991a0f9c700 (patch) | |
tree | add1972ac6fda19c9cf3dfd7e056be3580ce5615 | |
parent | 7168c684afd29d0c28b9ad4c148dc590e52fbb4d (diff) |
Fix room polling not stopped when leaving the current room
When setting a room in the internal signaling a poller is started that
synchronizes the room data periodically; that poller should be stopped
when the room is left.
Note, however, that the poller should not be stopped when leaving the
current room if it was initialized for a room collection instead.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r-- | js/signaling.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/signaling.js b/js/signaling.js index 7633f9ad0..905278a21 100644 --- a/js/signaling.js +++ b/js/signaling.js @@ -540,8 +540,11 @@ this._startPullingMessages(); }; - OCA.Talk.Signaling.Internal.prototype._doLeaveRoom = function(/*token*/) { - // Nothing to do anymore + OCA.Talk.Signaling.Internal.prototype._doLeaveRoom = function(token) { + if (token === this.currentRoomToken && !this.roomCollection) { + window.clearInterval(this.roomPoller); + this.roomPoller = null; + } }; OCA.Talk.Signaling.Internal.prototype.sendCallMessage = function(data) { |