We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fef46c commit 369cf43Copy full SHA for 369cf43
Assets/BossRoom/Scripts/Shared/Net/ConnectionManagement/ClientGameNetPortal.cs
@@ -102,6 +102,14 @@ public void OnUserDisconnectRequest()
102
StopCoroutine(m_TryToReconnectCoroutine);
103
m_TryToReconnectCoroutine = null;
104
}
105
+
106
+ if (!m_Portal.NetManager.IsConnectedClient)
107
+ {
108
+ // If we are here, it means we will not receive the OnClientDisconnectCallback since we are already disconnected.
109
+ // In that case, publish the disconnect reason and clear it now.
110
+ m_ConnectStatusPub.Publish(DisconnectReason.Reason);
111
+ DisconnectReason.Clear();
112
+ }
113
114
115
0 commit comments