Skip to content

Commit

Permalink
GODRIVER-2997 Prevent user-defined context from canceling in txn comm…
Browse files Browse the repository at this point in the history
…it loop
  • Loading branch information
prestonvasquez committed Oct 5, 2023
1 parent c0caefe commit 06ec88b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongo/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (s *sessionImpl) WithTransaction(ctx context.Context, fn func(ctx SessionCo

CommitLoop:
for {
err = s.CommitTransaction(ctx)
err = s.CommitTransaction(newBackgroundContext(ctx))
// End when error is nil, as transaction has been committed.
if err == nil {
return res, nil
Expand Down

0 comments on commit 06ec88b

Please sign in to comment.