Skip to content

Commit c4c8746

Browse files
committed
use driver.TransientTransactionError
1 parent f4fc9f4 commit c4c8746

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

testdata/specifications

Submodule specifications updated 64 files

x/mongo/driver/topology/pool.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ func (p *pool) checkOut(ctx context.Context) (conn *connection, err error) {
504504
}
505505
return nil, ErrPoolClosed
506506
case poolPaused:
507-
err := poolClearedError{err: p.lastClearErr, address: p.address, errorLabels: []string{"TransientTransactionError"}}
507+
err := poolClearedError{err: p.lastClearErr, address: p.address, errorLabels: []string{driver.TransientTransactionError}}
508508
p.stateMu.RUnlock()
509509

510510
duration := time.Since(start)
@@ -1050,7 +1050,7 @@ func (p *pool) clearImpl(err error, serviceID *bson.ObjectID, interruptAllConnec
10501050
}
10511051

10521052
if serviceID == nil {
1053-
pcErr := poolClearedError{err: err, address: p.address, errorLabels: []string{"TransientTransactionError"}}
1053+
pcErr := poolClearedError{err: err, address: p.address, errorLabels: []string{driver.TransientTransactionError}}
10541054

10551055
// Clear the idle connections wait queue.
10561056
p.idleMu.Lock()

0 commit comments

Comments
 (0)