From 961a27049fb3facd51a08a073cbe905d5380b561 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 30 十一月 2023 18:35:22 +0800
Subject: [PATCH] #盘点逻辑修改
---
src/main/java/com/zy/core/thread/NyShuttleThread.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/NyShuttleThread.java b/src/main/java/com/zy/core/thread/NyShuttleThread.java
index 6d381d2..a076f5a 100644
--- a/src/main/java/com/zy/core/thread/NyShuttleThread.java
+++ b/src/main/java/com/zy/core/thread/NyShuttleThread.java
@@ -113,12 +113,6 @@
private void readStatus() {
try {
- if (null == shuttleProtocol) {
- shuttleProtocol = new NyShuttleProtocol();
- shuttleProtocol.setShuttleNo(slave.getId().shortValue());
- shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
- }
-
//----------璇诲彇鍥涘悜绌挎杞︾姸鎬�-----------
NyShuttleHttpCommand readStatusCommand = NyHttpUtils.getReadStatusCommand(slave.getId());
JSONObject jsonObject = NyHttpUtils.requestCommand(socket, readStatusCommand);
@@ -247,6 +241,7 @@
OutputQueue.SHUTTLE.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId()));
// log.info(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId()));
}
+ log.warn(JSON.toJSONString(shuttleProtocol));
}
} catch (Exception e) {
e.printStackTrace();
@@ -269,6 +264,11 @@
socket.setSoTimeout(60000);
socket.setKeepAlive(true);
this.socket = socket;
+ if (null == shuttleProtocol) {
+ shuttleProtocol = new NyShuttleProtocol();
+ shuttleProtocol.setShuttleNo(slave.getId().shortValue());
+ }
+ shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
log.info(MessageFormat.format("銆恵0}銆戝洓鍚戠┛姊溅Socket閾炬帴鎴愬姛 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
} catch (IOException e) {
OutputQueue.SHUTTLE.offer(MessageFormat.format("銆恵0}銆戝洓鍚戠┛姊溅Socket閾炬帴澶辫触 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
--
Gitblit v1.9.1