chengxilo opened a new pull request, #2860: URL: https://github.com/apache/iggy/pull/2860
## Which issue does this PR close? N/A ## Rationale In PR #2580, I implemented the connect() method for the TCP client. 1. However, the initial implementation incorrectly set the client state to Disconnected immediately upon a single failed connection attempt during the retry loop. 2. Also, I used Unrecoverable(which force stop retry) for `c.config.reconnection.enabled=false`. It actually makes the code hard to maintain. ## What changed? 1. Move the location of code to set state as `Disconnected`, now only set as `Disconnected` when all retries fail. 2. ## Local Execution - Passed - Pre-commit hooks ran <!-- You must run your code locally before submitting. "Relying on CI" is not acceptable - PRs from authors who haven't run the code will be closed. Did you have `prek` installed? It runs automatically on commit and covers all project languages. See [CONTRIBUTING.md](https://github.com/apache/iggy/blob/master/CONTRIBUTING.md). --> ## AI Usage <!-- If AI tools were used, please answer: 1. Which tools? (e.g., GitHub Copilot, Claude, ChatGPT) 3. Scope of usage? (e.g., autocomplete, generated functions, entire implementation) 4. How did you verify the generated code works correctly? 5. Can you explain every line of the code if asked? If no AI tools were used, write "None" or delete this section. --> 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]
