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; }