This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Description
Right now pool.CloseAll() calls Close() on all connections it has, but doesn't wait until their loops are actually stopped before exiting itself.
Goroutines running the connection loops stop fast, but after session.Close() returns they should be already stopped, otherwise goleak will complain about leaked goroutines in tests.
|
// closeAll is called by PoolRefiller. |
|
func (p *ConnPool) closeAll() { |
|
for i := range p.conns { |
|
if conn, ok := p.conns[i].Swap((*Conn)(nil)).(*Conn); ok { |
|
conn.Close() |
|
} |
|
} |
|
} |