222twotwotwo opened a new pull request, #140: URL: https://github.com/apache/dubbo-getty/pull/140
<!-- Thanks for sending a pull request! --> **What this PR does**: Fixes reconnect attempt accounting so successful pool fills no longer consume the reconnect failure budget. `connect()` now reports whether it actually added a session, and `reConnect()` only increments `reconnectAttempts` when no session was added. Also adds regression coverage for: - bounded reconnect exit when the target remains unreachable - successful connection pool fills with `ConnectionNumber > ReconnectAttempts` **Which issue(s) this PR fixes**: #132 <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes #132 **Special notes for your reviewer**: This keeps the upstream-style single-attempt dial behavior, while making retry accounting track consecutive failures rather than successful pool-fill progress. Validated with: ```text go test ./... go vet ./... git diff --check ``` **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note NONE ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
