- Severity: Medium
- Location:
shenyu-sync-data-center/shenyu-sync-data-websocket/src/main/java/org/apache/shenyu/plugin/sync/data/websocket/WebsocketSyncDataService.java:110 (timer = WheelTimerFactory.getSharedTimer()), :178 (timer.shutdown())
Description:
close() calls timer.shutdown() where timer is the JVM-wide singleton Timer from WheelTimerFactory.getSharedTimer(). The same shared timer is used by FailbackRegistryRepository (FailbackRegistryRepository.java:50: this.timer = WheelTimerFactory.getSharedTimer()). Shutting down the shared timer destroys the registration retry mechanism for all components that depend on it.
Impact:
If WebsocketSyncDataService is destroyed without full application shutdown (bean refresh, conditional reconfiguration), FailbackRegistryRepository's retry timer is killed, silently breaking registration retry.
Suggested fix:
Do not call timer.shutdown() in close(). Only cancel the service's own timerTask. Use WheelTimerFactory.newWheelTimer() for a private timer instance if shutdown is required.
Confidence: High
Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/06-medium-tiers.md.
shenyu-sync-data-center/shenyu-sync-data-websocket/src/main/java/org/apache/shenyu/plugin/sync/data/websocket/WebsocketSyncDataService.java:110(timer = WheelTimerFactory.getSharedTimer()),:178(timer.shutdown())Description:
close()callstimer.shutdown()wheretimeris the JVM-wide singletonTimerfromWheelTimerFactory.getSharedTimer(). The same shared timer is used byFailbackRegistryRepository(FailbackRegistryRepository.java:50: this.timer = WheelTimerFactory.getSharedTimer()). Shutting down the shared timer destroys the registration retry mechanism for all components that depend on it.Impact:
If
WebsocketSyncDataServiceis destroyed without full application shutdown (bean refresh, conditional reconfiguration),FailbackRegistryRepository's retry timer is killed, silently breaking registration retry.Suggested fix:
Do not call
timer.shutdown()inclose(). Only cancel the service's owntimerTask. UseWheelTimerFactory.newWheelTimer()for a private timer instance if shutdown is required.Confidence: High
Identified during the 2026-08-02 deep re-scan; full list in
docs/scan2-2026-08-02/06-medium-tiers.md.