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:
parent
ddb14f48bf
commit
93a7f9959e
1 changed files with 1 additions and 0 deletions
|
@ -235,6 +235,7 @@ export class Sync {
|
||||||
await Promise.all(roomStates.map(async rs => {
|
await Promise.all(roomStates.map(async rs => {
|
||||||
rs.preparation = await rs.room.prepareSync(rs.roomResponse, rs.membership, prepareTxn);
|
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)));
|
await Promise.all(roomStates.map(rs => rs.room.afterPrepareSync(rs.preparation)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue