fix agent getverion

This commit is contained in:
bwcx_jzy 2022-02-08 15:06:17 +08:00
parent 98f137e71b
commit 362f3b4068
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
2 changed files with 8 additions and 1 deletions

View File

@ -74,6 +74,10 @@ public class NodeClient extends WebSocketClient {
@Override
public void onOpen(ServerHandshake serverHandshake) {
// 连接成功后获取版本信息
getVersion();
}
public void getVersion() {
WebSocketMessageModel command = new WebSocketMessageModel("getVersion", this.nodeModel.getId());
send(command.toString());
}

View File

@ -108,7 +108,10 @@ public class NodeUpdateHandler extends BaseProxyHandler {
return;
}
for (NodeModel model : nodeModelList) {
if (clientMap.containsKey(model.getId())) {
NodeClient nodeClient = clientMap.get(model.getId());
if (nodeClient != null) {
//
nodeClient.getVersion();
continue;
}
Map<String, Object> attributes = session.getAttributes();