comptible socket and passport service in AISDK

This commit is contained in:
zhongchao
2021-03-03 17:47:21 +08:00
parent 9136f633eb
commit 1ca1f1c879
12 changed files with 330 additions and 124 deletions

View File

@@ -43,11 +43,12 @@ public class InternalSocketManager implements OnSocketReceiveCallback, OnSocketA
mSocketConnManager = SocketConnManagerImpl.getInstance(context);
mSocketConnManager.addSocketMessageCallback(this);
mSocketConnManager.addSocketAckCallback(this);
if (TextUtils.isEmpty(cloudClientConfig.getSocketAppId())) {
String appId = cloudClientConfig.getServiceAppId();
if (TextUtils.isEmpty(appId)) {
Logger.e(TAG, "需要初始化 Socket AppId");
return;
}
mSocketConnManager.init(cloudClientConfig.getSocketAppId());
mSocketConnManager.init(appId);
}
@Override
@@ -72,8 +73,10 @@ public class InternalSocketManager implements OnSocketReceiveCallback, OnSocketA
}
public void release() {
mSocketConnManager.onRelease();
mSocketConnManager = null;
if (mSocketConnManager != null) {
mSocketConnManager.onRelease();
mSocketConnManager = null;
}
mInstance = null;
}
}