Changed `max-retries` to `max_retries` and using ` clear_active_connections!` instead of directly accessing ivar