perf: 优化日志

dev
huangfeng 8 months ago
parent 0df252fae8
commit 9b55f52d37

@ -40,10 +40,10 @@ public class IecServer implements ServerEventListener {
} }
} }
public void close() { public void stop() {
if (serverSap != null) { if (serverSap != null) {
serverSap.stop(); serverSap.stop();
log.info("已停止IEC61850服务端."); log.info("已停止IEC61850服务端于" + port + "端口");
} }
started = false; started = false;
} }

@ -76,8 +76,7 @@ public class IecServerService {
private void onlyStopServer(Integer fileId) { private void onlyStopServer(Integer fileId) {
IecServer iecServer = StaticVariable.iecServerMap.get(fileId); IecServer iecServer = StaticVariable.iecServerMap.get(fileId);
if (iecServer != null) { if (iecServer != null) {
log.info("关闭IecServer服务, port=" + iecServer.port); iecServer.stop();
iecServer.close();
StaticVariable.iecServerMap.remove(fileId); StaticVariable.iecServerMap.remove(fileId);
} }
} }

Loading…
Cancel
Save