From 2574334327d47d5b0d62e1e9fe442a493bbcf2bd Mon Sep 17 00:00:00 2001
From: 562935844@qq.com
Date: 星期二, 11 四月 2023 15:52:54 +0800
Subject: [PATCH] 新增接收主机退网delete/notify主题处理
---
HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HdlSocketHelper.java | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HdlSocketHelper.java b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HdlSocketHelper.java
index 4bcc51e..abac95d 100644
--- a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HdlSocketHelper.java
+++ b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HdlSocketHelper.java
@@ -21,7 +21,7 @@
*/
public class HdlSocketHelper {
- private static final Long DEF_SEND_TIMEOUT = 500L;
+ private static final Long DEF_SEND_TIMEOUT = 1000L;
private static final int DEF_MAX_RETRY = 4;
private static final int DEF_SEND_ONE = 1;
@@ -173,7 +173,7 @@
}
}
} catch (Exception e) {
- e.printStackTrace();
+ LogUtils.e("鍙戦�佹暟鎹け璐�:" + e.getMessage());
}
} else {
//瓒呭嚭閲嶅彂娆℃暟骞舵病鏈夋敹鍒板洖澶�
@@ -206,13 +206,17 @@
private void notifyFailure() {
//绉婚櫎鐩戝惉
removeListener();
- if (sendThread != null) {
- sendThread.shutdownNow();
- sendThread = null;
- }
- if (listener != null) {
- listener.onFailure();
- listener = null;
+ try {
+ if (sendThread != null) {
+ sendThread.shutdownNow();
+ sendThread = null;
+ }
+ if (listener != null) {
+ listener.onFailure();
+ listener = null;
+ }
+ } catch (Exception e) {
+
}
}
}
--
Gitblit v1.8.0