You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a Network Authenticator is implemented, authentication can take several frames, or even seconds, or even minutes depending on complexity (e.g. account creation, character selection, etc.).
Kcp Transport invokes NetworkClient.OnConnected immediately, which calls NetworkTime.UpdateClient:
Server kicks the connection because NetworkPingMessage gets to server before Authentication has completed and server still has that connection in KcpState.Connected, logging this on server:
KCP: received unreliable message in state Connected. Disconnecting the connection.
UnityEngine.Debug:LogWarning(Object)
kcp2k.KcpConnection:RawInput(Byte[], Int32) (at Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpConnection.cs:447)
kcp2k.KcpServer:Tick() (at Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpServer.cs:206)
kcp2k.KcpTransport:LateUpdate() (at Assets/Mirror/Runtime/Transport/KCP/MirrorTransport/KcpTransport.cs:125)
Bottom Line
It's not Kcp's role to be draconian here. Mirror will deal with inappropriate messages. Kcp needs to just pass the message through and not worry about it.
The text was updated successfully, but these errors were encountered:
for future reference: kcp authentication happens way before mirror even knows about the connection.
the unreliable message probably comes from elsewhere.
If a Network Authenticator is implemented, authentication can take several frames, or even seconds, or even minutes depending on complexity (e.g. account creation, character selection, etc.).
Kcp Transport invokes NetworkClient.OnConnected immediately, which calls NetworkTime.UpdateClient:
NetworkTime.cs
Server kicks the connection because NetworkPingMessage gets to server before Authentication has completed and server still has that connection in KcpState.Connected, logging this on server:
Bottom Line
It's not Kcp's role to be draconian here. Mirror will deal with inappropriate messages. Kcp needs to just pass the message through and not worry about it.
The text was updated successfully, but these errors were encountered: