fix: 修改 token 检验

This commit is contained in:
zhangshuai
2024-09-04 15:17:30 +08:00
parent db049e78f4
commit ee091445a4

View File

@@ -74,7 +74,7 @@ public class EnvironmentWebSocketHandler extends TextWebSocketHandler {
EnvironmentEntity deviceEntity = environmentService.queryInfo(envId);
JSONObject paramJSONObject = deviceEntity.getParamJSONObject();
if (T.StrUtil.equals(token, paramJSONObject.getStr("token"))) {
if (!T.StrUtil.equals(token, paramJSONObject.getStr("token"))) {
log.warn("WebSocket connectioned error. env token exception. env id: {}, token: {}", envId, token);
session.sendMessage(new TextMessage("Token error, Please config env token"));
session.close();