From 86011b42e3d1cb241a0e3ded75dd7787cc674a81 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 24 Feb 2021 09:58:50 +0100 Subject: [PATCH] await the room log operations for login/load session so the callee can await the operation --- src/matrix/SessionContainer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/SessionContainer.js b/src/matrix/SessionContainer.js index a3cdf0a0..a3045dba 100644 --- a/src/matrix/SessionContainer.js +++ b/src/matrix/SessionContainer.js @@ -73,7 +73,7 @@ export class SessionContainer { return; } this._status.set(LoadStatus.Loading); - this._platform.logger.run("load session", async log => { + await this._platform.logger.run("load session", async log => { log.set("id", sessionId); try { const sessionInfo = await this._platform.sessionInfoStorage.get(sessionId); @@ -94,7 +94,7 @@ export class SessionContainer { if (this._status.get() !== LoadStatus.NotLoading) { return; } - this._platform.logger.run("login", async log => { + await this._platform.logger.run("login", async log => { this._status.set(LoadStatus.Login); const clock = this._platform.clock; let sessionInfo;