Skip to content

Commit b4f5ef1

Browse files
GODRIVER-2997 [master] Prevent cancelable context in txn commit loop (#1421)
Co-authored-by: Preston Vasquez <[email protected]>
1 parent 39d0411 commit b4f5ef1

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)