Expand description
Auto-reconnecting client decorator for transport resilience.
Wraps an McpClient and automatically reconnects when a
TransportDead error is detected.
When multiple concurrent calls detect a dead transport simultaneously,
only one reconnection attempt proceeds (CAS on reconnecting). Other
callers wait on a tokio::sync::Notify for the reconnection to complete,
then retry with the fresh client. This prevents reconnection-induced
failures from cascading into the circuit breaker.
Structsยง
- Reconnecting
Client - A client wrapper that auto-reconnects on transport death.