From 2ddf0953953a8c4883e8e21d0ff6b1b03a6e898e Mon Sep 17 00:00:00 2001 From: weidong Date: Thu, 28 Mar 2024 10:45:08 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=8C=87=E4=BB=A4=E4=BB=8E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=80=9A=E9=81=93=E5=8F=91=E4=B8=8B=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/imdroid/sideslope/web/ApiController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/web/ApiController.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/web/ApiController.java index fa5e92cc..46e879eb 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/web/ApiController.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/web/ApiController.java @@ -39,7 +39,9 @@ public class ApiController { Map status = new HashMap<>(); HttpResp resp = new HttpResp(); DeviceChannel deviceChannel = OnlineChannels.INSTANCE.getConfigChannel(deviceId); - if(deviceChannel == null) deviceChannel = OnlineChannels.INSTANCE.getDataChannel(deviceId); + if(deviceChannel == null || !deviceChannel.isOnline()) { + deviceChannel = OnlineChannels.INSTANCE.getDataChannel(deviceId); + } //if(deviceChannel!=null && deviceChannel.isOnline()){ if(deviceChannel!=null && deviceChannel.isOnline()){ status.put("status", "Online");