Skip to content

Commit 757e2a7

Browse files
GODRIVER-2997 Prevent cancelable context in txn commit loop (#1416)
1 parent 92aa76c commit 757e2a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongo/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func (s *sessionImpl) WithTransaction(ctx context.Context, fn func(ctx SessionCo
233233

234234
CommitLoop:
235235
for {
236-
err = s.CommitTransaction(ctx)
236+
err = s.CommitTransaction(newBackgroundContext(ctx))
237237
// End when error is nil, as transaction has been committed.
238238
if err == nil {
239239
return res, nil

0 commit comments

Comments
 (0)