BobSong-dev opened a new pull request, #6928:
URL: https://github.com/apache/shenyu/pull/6928

   Fixes #6784
   
   ## 背景
   
   `WebsocketSyncDataService` 在巡检时,如果发现某个客户端已经不处于 open 状态,
   会直接把它从客户端列表中移除。
   
   但这个分支没有调用客户端的 `nowClose()`。这样客户端关联的健康检查定时任务
   还会继续运行,并可能在后台重新建立连接。重连后的客户端已经不在服务的管理列表
   里,后续也不会被统一关闭。
   
   ## 修改内容
   
   在移除未打开的 WebSocket 客户端前,先调用 `nowClose()`,取消客户端自身的
   健康检查任务,再从列表中移除。
   
   该处理方式与同一个方法中 `!isConnectedToMaster()` 分支的关闭逻辑保持一致。
   
   同时补充了回归测试,验证失效客户端会被关闭并移出客户端列表。
   
   ## 验证
   
   已执行 WebSocket 同步模块及其依赖模块测试:
   
   - Tests run: 45
   - Failures: 0
   - Errors: 0
   - BUILD SUCCESS


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