【7.3.0】更新配置监听设置

pull/40/MERGE
fengshuonan 2022-10-22 22:54:20 +08:00
parent 227a4401e3
commit 63e62ea16a
1 changed files with 3 additions and 2 deletions

View File

@ -223,9 +223,10 @@ public class DefaultSessionManager implements SessionManagerApi, ConfigUpdateCal
public void configUpdate(String code, String value) {
// 如果系统配置修改了websocket url则刷新所有在线用户的配置
if (WEB_SOCKET_WS_URL_CONFIG_CODE.equals(code)) {
List<LoginUser> loginUsers = this.onlineUserList();
for (LoginUser loginUser : loginUsers) {
Map<String, LoginUser> allKeyValues = loginUserCache.getAllKeyValues();
for (LoginUser loginUser : allKeyValues.values()) {
loginUser.setWsUrl(WebSocketConfigExpander.getWebSocketWsUrl());
this.updateSession(loginUser.getToken(), loginUser);
}
}
}