Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Jan 4, 2024
1 parent e276867 commit 01f3cbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/mongo/driver/topology/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,11 @@ func (p *pool) stale(conn *connection) bool {
return true
}
p.stateMu.RLock()
defer p.stateMu.RUnlock()
if p.state == poolClosed {
p.stateMu.RUnlock()
return true
}
p.stateMu.RUnlock()
if generation, ok := p.generation.getGeneration(conn.desc.ServiceID); ok {
return conn.generation < generation
}
Expand Down

0 comments on commit 01f3cbc

Please sign in to comment.