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.
This commit is contained in:
Bruno Windels 2020-10-01 14:31:38 +02:00
parent ddb14f48bf
commit 93a7f9959e

View file

@ -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)));
}