Skip to content

Commit 7f6ed4d

Browse files
committed
pull back idle connections pcerr
1 parent 46de325 commit 7f6ed4d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

x/mongo/driver/topology/pool.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,19 +1055,15 @@ func (p *pool) clearImpl(err error, serviceID *bson.ObjectID, interruptAllConnec
10551055

10561056
if serviceID == nil {
10571057
pcErr := poolClearedError{err: err, address: p.address}
1058-
labeledErr := driver.Error{
1059-
Message: pcErr.Error(),
1060-
Labels: []string{driver.TransientTransactionError},
1061-
Wrapped: pcErr,
1062-
}
1058+
10631059
// Clear the idle connections wait queue.
10641060
p.idleMu.Lock()
10651061
for {
10661062
w := p.idleConnWait.popFront()
10671063
if w == nil {
10681064
break
10691065
}
1070-
w.tryDeliver(nil, labeledErr)
1066+
w.tryDeliver(nil, pcErr)
10711067
}
10721068
p.idleMu.Unlock()
10731069

@@ -1080,7 +1076,7 @@ func (p *pool) clearImpl(err error, serviceID *bson.ObjectID, interruptAllConnec
10801076
if w == nil {
10811077
break
10821078
}
1083-
w.tryDeliver(nil, labeledErr)
1079+
w.tryDeliver(nil, pcErr)
10841080
}
10851081
p.createConnectionsCond.L.Unlock()
10861082
}

0 commit comments

Comments
 (0)