From f9c0b4b53e749da0bf8ddff2964317f61417310c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 7 May 2020 19:14:30 +0200 Subject: [PATCH] add logging in case #45 would happen again --- src/matrix/room/Room.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index e533d932..60983df2 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -115,12 +115,16 @@ export class Room extends EventEmitter { if (this._timeline) { throw new Error("not dealing with load race here for now"); } + console.log(`opening the timeline for ${this._roomId}`); this._timeline = new Timeline({ roomId: this.id, storage: this._storage, fragmentIdComparer: this._fragmentIdComparer, pendingEvents: this._sendQueue.pendingEvents, - closeCallback: () => this._timeline = null, + closeCallback: () => { + console.log(`closing the timeline for ${this._roomId}`); + this._timeline = null; + }, user: this._user, }); await this._timeline.load();