Skip to content

Commit 564d5ef

Browse files
blink1073prestonvasquez
authored andcommitted
GODRIVER-2997 [master] Prevent cancelable context in txn commit loop (#1421)
Co-authored-by: Preston Vasquez <[email protected]>
1 parent 843fc52 commit 564d5ef

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
@@ -234,7 +234,7 @@ func (s *sessionImpl) WithTransaction(ctx context.Context, fn func(ctx SessionCo
234234

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

0 commit comments

Comments
 (0)