From 4f38ce06158cd80559f5dcf6efa644ad8888bb9a Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 24 Jun 2020 13:56:28 +0800 Subject: [PATCH] chore --- Realtime/Realtime-Unity/Realtime-Unity.csproj | 3 --- Realtime/Realtime/Internal/Connection/LCConnection.cs | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Realtime/Realtime-Unity/Realtime-Unity.csproj b/Realtime/Realtime-Unity/Realtime-Unity.csproj index b900418..7e1a4a8 100644 --- a/Realtime/Realtime-Unity/Realtime-Unity.csproj +++ b/Realtime/Realtime-Unity/Realtime-Unity.csproj @@ -52,9 +52,6 @@ Internal\Controller\LCIMConversationController.cs - - Internal\Controller\LCIMGoAwayController.cs - Internal\Router\LCRTMServer.cs diff --git a/Realtime/Realtime/Internal/Connection/LCConnection.cs b/Realtime/Realtime/Internal/Connection/LCConnection.cs index 40312d7..3b797ac 100644 --- a/Realtime/Realtime/Internal/Connection/LCConnection.cs +++ b/Realtime/Realtime/Internal/Connection/LCConnection.cs @@ -70,8 +70,10 @@ namespace LeanCloud.Realtime.Internal.Connection { private LCWebSocketClient ws; private State state; + // 可以在 connecting 状态时拿到 Task,并在重连成功后继续操作 private Task connectTask; + // 共享这条连接的 IM Client private readonly Dictionary idToClients; internal LCConnection(string id) { @@ -193,8 +195,10 @@ namespace LeanCloud.Realtime.Internal.Connection { } } else { if (command.Cmd == CommandType.Echo) { + // 心跳应答 heartBeat.Pong(); } else if (command.Cmd == CommandType.Goaway) { + // 针对连接的消息 Reset(); } else { // 通知