Aias00 opened a new issue, #6784: URL: https://github.com/apache/shenyu/issues/6784
- Severity: Medium - Location: `shenyu-sync-data-center/shenyu-sync-data-websocket/src/main/java/org/apache/shenyu/plugin/sync/data/websocket/WebsocketSyncDataService.java:147-149` (`!isOpen()` branch), compare `:159-162` (`!isConnectedToMaster()` branch) - Description: In `masterCheck()`, when `!websocketClient.isOpen()`, the client is removed via `iterator.remove()` but `nowClose()` is NOT called. The client's health-check timer task (created in `ShenyuWebsocketClient.connection()`, runs every 10s) is left running. The timer's `healthCheck()` calls `reconnectBlocking()` when `!isOpen()`. If reconnection succeeds after the client was removed, the reconnected client is orphaned — it still processes messages but is no longer tracked by `masterCheck()` or closed by `WebsocketSyncDataService.close()`. The `!isConnectedToMaster()` branch correctly calls `nowClose()` before removing. - Impact: Resource leak: orphaned WebSocket connections and timer tasks never cleaned up. Multi-admin deployments with intermittent connectivity accumulate leaked connections over time. - Suggested fix: Call `websocketClient.nowClose()` before `iterator.remove()` in the `!isOpen()` branch, matching the `!isConnectedToMaster()` branch. - Confidence: Medium - Related existing: none — #6461 is reconnect behavior on admin restart, not timer leak on `!isOpen()` removal. --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._ -- 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]
