chore: session open 之后断开连接
parent
9ca71dba39
commit
aa832f4cb5
|
@ -297,8 +297,15 @@ namespace LeanCloud.Realtime {
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task Open(bool force = true) {
|
public async Task Open(bool force = true) {
|
||||||
await Connection.Connect();
|
await Connection.Connect();
|
||||||
|
try {
|
||||||
// 打开 Session
|
// 打开 Session
|
||||||
await SessionController.Open(force);
|
await SessionController.Open(force);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LCLogger.Error(e);
|
||||||
|
// 如果 session 阶段异常,则关闭连接
|
||||||
|
await Connection.Close();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue