Skip to content

Commit

Permalink
Don't use request context for BeginTx until mattn/go-sqlite3#764 is f…
Browse files Browse the repository at this point in the history
…ixed
  • Loading branch information
neilalexander committed Aug 28, 2020
1 parent b697306 commit 8a05fb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syncapi/storage/shared/syncserver.go
Expand Up @@ -451,7 +451,7 @@ func (d *Database) addPDUDeltaToResponse(
wantFullState bool,
res *types.Response,
) (joinedRoomIDs []string, err error) {
txn, err := d.DB.BeginTx(ctx, &txReadOnlySnapshot)
txn, err := d.DB.BeginTx(context.TODO(), &txReadOnlySnapshot) // TODO: check mattn/go-sqlite3#764
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -635,7 +635,7 @@ func (d *Database) getResponseWithPDUsForCompleteSync(
// a consistent view of the database throughout. This includes extracting the sync position.
// This does have the unfortunate side-effect that all the matrixy logic resides in this function,
// but it's better to not hide the fact that this is being done in a transaction.
txn, err := d.DB.BeginTx(ctx, &txReadOnlySnapshot)
txn, err := d.DB.BeginTx(context.TODO(), &txReadOnlySnapshot) // TODO: check mattn/go-sqlite3#764
if err != nil {
return
}
Expand Down

0 comments on commit 8a05fb0

Please sign in to comment.