Commit 6c745e31d53f919843b00fca73651f860a812a7f

Authored by 李攀
1 parent 0d04647a

auto add when send heart beat

@@ -227,8 +227,11 @@ public class SocketService1 extends BaseService { @@ -227,8 +227,11 @@ public class SocketService1 extends BaseService {
227 if (!msg.contains("20025")) { 227 if (!msg.contains("20025")) {
228 LogUtils.i(TAG, "send msg:" + msg); 228 LogUtils.i(TAG, "send msg:" + msg);
229 } else { 229 } else {
230 - if (heartBeatErrorCount.getAndDecrement() > 3) { 230 + if (heartBeatErrorCount.getAndIncrement() > 3) {
  231 +// if (heartBeatErrorCount.getAndDecrement() >= 0) {
  232 + LogUtils.i(TAG, "heartBeatErrorCount:" + heartBeatErrorCount.get());
231 clearConnect(); 233 clearConnect();
  234 + return false;
232 } 235 }
233 LogUtils.d(TAG, "send heart beat msg:" + msg); 236 LogUtils.d(TAG, "send heart beat msg:" + msg);
234 } 237 }
Please register or login to post a comment