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

transport: pool, closeAll should wait until all connection loops are stopped #290

@Kulezi

Description

@Kulezi

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()
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions