Showing
1 changed file
with
4 additions
and
1 deletions
| ... | ... | @@ -227,8 +227,11 @@ public class SocketService1 extends BaseService { |
| 227 | 227 | if (!msg.contains("20025")) { |
| 228 | 228 | LogUtils.i(TAG, "send msg:" + msg); |
| 229 | 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 | 233 | clearConnect(); |
| 234 | + return false; | |
| 232 | 235 | } |
| 233 | 236 | LogUtils.d(TAG, "send heart beat msg:" + msg); |
| 234 | 237 | } | ... | ... |
Please
register
or
login
to post a comment