Skip to content

reconnect() holds the pool slot while sleeping between attempts #10

Description

@CritasWang

Session::reconnect() sleeps retry_interval between passes and walks all endpoints while still holding its pool slot. With defaults (3 endpoints, 3 attempts, 1s interval) the worst case is ~92s, during which concurrent acquire() callers get "pool exhausted" — an error that points away from the real cause.

Fix: when the session is handed out from a pool, skip the between-attempt sleeps (the slot is still held, but the hold time drops to the connect+handshake attempts), or shorten them. Standalone sessions keep the current C#-style pacing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions