fix: 优化订阅异常处理

dev
huangfeng 8 months ago
parent 0c71c7ea3a
commit cde11b89b1

@ -66,6 +66,7 @@ public class IecClient implements ClientEventListener {
public void disconnect() {
try {
clientAssociation.disconnect();
clientAssociation = null;
} catch (Exception ignore) {
}
}

@ -71,10 +71,9 @@ public class RealTimeDataService {
iedRepository.save(ied);
clientMap.put(ied.getId(), iecClient);
} catch (Exception ex) {
ied.setStart(Constants.FALSE);
iedRepository.save(ied);
String err = "61850订阅异常, ied=" + ied.getName() + ", ip=" + ied.getIp() + ", port=" + ied.getPort();
log.error(err, ex);
this.stopCollect(iedId);
throw new BusinessException(err);
} finally {
inDoing = false;

Loading…
Cancel
Save