wy471x opened a new pull request, #6898:
URL: https://github.com/apache/shenyu/pull/6898

   ## Summary
   - `ShenyuWebsocketClient.healthCheck()` previously called 
`reconnectBlocking()` directly on the shared wheel timer's single-thread 
executor. When an admin was unreachable, the TCP connect timeout blocked all 
other timer tasks (other clients' health checks, `masterCheck`), causing missed 
heartbeats and delayed failover.
   - Offloaded reconnect to a dedicated `CachedThreadPool` executor so the 
timer thread is never blocked.
   - Added exponential backoff with jitter (1s–60s) and an `AtomicBoolean` 
guard to prevent concurrent reconnect attempts for the same client.
   
   ## Test plan
   - [x] `calculateBackoff()` returns 0 for no failures, exponential growth for 
failures 1-10, capped at 60s, with jitter
   - [x] `healthCheck()` resets backoff on healthy connection, does not 
double-submit reconnects
   - [x] `doReconnect()` increments backoff on failure (capped at 10), resets 
`reconnecting` in finally, applies backoff sleep, preserves interrupt status
   - [x] All 15 tests pass (11 new + 4 existing)
   
   šŸ¤– Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to