change the socket release func

This commit is contained in:
zhongchao
2021-07-29 10:22:48 +08:00
parent 8b97d4c2f6
commit 59f4d00f46
3 changed files with 11 additions and 17 deletions

View File

@@ -210,15 +210,11 @@ public class SocketManager implements IMogoCloudSocketManager {
}
public synchronized void release() {
mListeners.clear();
mAckListeners.clear();
if (cloudClientConfig.isThirdLogin()) {
ThirdSocketManager.getInstance().release();
} else {
InternalSocketManager.getInstance().release();
}
cloudClientConfig = null;
mInstance = null;
}
}

View File

@@ -53,7 +53,6 @@ public class ThirdSocketManager implements Callback {
.setAuthPubKey(cloudClientConfig.getAuthPubKey())
.setDebug(cloudClientConfig.isShowDebugLog());
SocketClient.getInstance().registerSocketCallback(this);
// SocketClient.getInstance().registerSocketConnCallback(this);
SocketClient.getInstance().start(context);
}
@@ -75,7 +74,6 @@ public class ThirdSocketManager implements Callback {
boolean ack,
long msgId) {
SocketClient.getInstance().sendData(SOCKET_CHANNEL_ID, MogoCommon.Product.mogoBussiness.getNumber(), payload, headerType, ack, msgId);
}
public synchronized void release() {