From d121cf43844a04c9ac6f2adff164a6cd92b8713f Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Tue, 25 Jun 2024 20:09:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=AD=E9=9F=B3=E5=B9=BF?= =?UTF-8?q?=E6=92=AD=E8=AE=BE=E5=A4=87=E8=AF=B7=E6=B1=82=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/controller/BroadcastController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/BroadcastController.java b/zc-business/src/main/java/com/zc/business/controller/BroadcastController.java index 6f25528c..a639c2fc 100644 --- a/zc-business/src/main/java/com/zc/business/controller/BroadcastController.java +++ b/zc-business/src/main/java/com/zc/business/controller/BroadcastController.java @@ -92,7 +92,7 @@ public class BroadcastController extends BaseController { jsonResult = JSONObject.parseObject(response.body().string()); } } catch (SocketTimeoutException e) { - if (numberOfReconnections >3){ + if (numberOfReconnections <3){ numberOfReconnections += 1; getToken(); return nearCamListDistance(params); @@ -100,9 +100,9 @@ public class BroadcastController extends BaseController { jsonResult = new JSONObject(); jsonResult.put("code","400"); jsonResult.put("msg","语音广播连接错误"); - return jsonResult; } } + numberOfReconnections = 0; return jsonResult; }