From e9cb2e061a393992cc64fa140a3603131ab74370 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Tue, 20 Sep 2022 17:26:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E5=B1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hisense/monitormanage/service/MonitorService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hisense/monitormanage/service/MonitorService.java b/src/main/java/com/hisense/monitormanage/service/MonitorService.java index 74adaed..3d6a056 100644 --- a/src/main/java/com/hisense/monitormanage/service/MonitorService.java +++ b/src/main/java/com/hisense/monitormanage/service/MonitorService.java @@ -115,12 +115,16 @@ public class MonitorService { if (e.getStatusCode() == HttpStatus.UNAUTHORIZED) { String responseString = e.getResponseBodyAsString(); reponse = JSONObject.parseObject(responseString, HashMap.class); + } else { + reponse = null; } + } catch (Exception exception) { + reponse = null; } if (reponse == null) { log.error("[monitor-capture]:" + "监控系统登录握手失败"); - throw new RuntimeException("监控系统登录握手失败"); + return; } //登录