From 9712b397cebc93127fcd4f79ea9abdaf970d64ce Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 26 May 2020 10:31:23 +0200 Subject: [PATCH] add TODO comment --- src/matrix/SessionContainer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrix/SessionContainer.js b/src/matrix/SessionContainer.js index 04df8680..f7e33c61 100644 --- a/src/matrix/SessionContainer.js +++ b/src/matrix/SessionContainer.js @@ -152,6 +152,10 @@ export class SessionContainer { // restored the connection, it would have already // started to session, so check first // to prevent an extra /versions request + + // TODO: this doesn't look logical, but works. Why? + // I think because isStarted is true by default. That's probably not what we intend. + // I think there is a bug here, in that even if the reconnector already started the session, we'd still do this. if (this._session.isStarted) { const lastVersionsResponse = await hsApi.versions({timeout: 10000}).response(); this._session.start(lastVersionsResponse);