From 93a7f9959edfe9c11f09916ea59210b495c9b0f7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 1 Oct 2020 14:31:38 +0200 Subject: [PATCH] Safari doesn't like the prepare txn still open when opening the sync txn Waiting for it to close magically solves the TransactionInactiveError we were seeing on some incremental sync request when reading from roomMembers. Still unsure what this is about, and if we should wait for all read txns to close or not. --- src/matrix/Sync.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/matrix/Sync.js b/src/matrix/Sync.js index 2db9ad54..ff41f9c1 100644 --- a/src/matrix/Sync.js +++ b/src/matrix/Sync.js @@ -235,6 +235,7 @@ export class Sync { await Promise.all(roomStates.map(async rs => { rs.preparation = await rs.room.prepareSync(rs.roomResponse, rs.membership, prepareTxn); })); + await prepareTxn.complete(); await Promise.all(roomStates.map(rs => rs.room.afterPrepareSync(rs.preparation))); }