From 2dc5df277be3dd4f8f7ca37f8bbea3451abd01ff Mon Sep 17 00:00:00 2001 From: James Frowen Date: Fri, 19 Apr 2024 19:03:07 +0100 Subject: [PATCH] style: fixing typos --- Assets/Mirage/Runtime/MessageHandler.cs | 10 +++++----- Assets/Mirage/Runtime/NetworkSceneManager.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Mirage/Runtime/MessageHandler.cs b/Assets/Mirage/Runtime/MessageHandler.cs index 0af076910a..1677f490fe 100644 --- a/Assets/Mirage/Runtime/MessageHandler.cs +++ b/Assets/Mirage/Runtime/MessageHandler.cs @@ -97,7 +97,7 @@ public void HandleMessage(INetworkPlayer player, ArraySegment packet) LogAndCheckDisconnect(player, e); if (_rethrowException) - // note, dont add Exception here, otherwise strack trace will be overritten + // note, dont add Exception here, otherwise stack trace will be overwritten throw; } } @@ -117,7 +117,7 @@ internal void InvokeHandler(INetworkPlayer player, int msgType, NetworkReader re { if (_messageHandlers.TryGetValue(msgType, out var handler)) { - if (CheckAuthenticaiton(player, msgType, handler)) + if (CheckAuthentication(player, msgType, handler)) handler.Delegate.Invoke(player, reader); } else @@ -136,7 +136,7 @@ internal void InvokeHandler(INetworkPlayer player, int msgType, NetworkReader re } } - private bool CheckAuthenticaiton(INetworkPlayer player, int msgType, Handler handler) + private bool CheckAuthentication(INetworkPlayer player, int msgType, Handler handler) { // always allowed if (handler.AllowUnauthenticated) @@ -146,14 +146,14 @@ private bool CheckAuthenticaiton(INetworkPlayer player, int msgType, Handler han if (player.Authentication != null) return true; - // not authenciated + // not authenticated // log and disconnect // player is Unauthenticated so we dont trust them // info log only, so attacker can force server to spam logs if (logger.LogEnabled()) { - // we know msgType is found (because we have hanlder), so we dont need if check for tryGet + // we know msgType is found (because we have handler), so we dont need if check for tryGet MessagePacker.MessageTypes.TryGetValue(msgType, out var type); logger.Log($"Unauthenticated Message {type} received from {player}, player is not Authenticated so handler will not be invoked"); } diff --git a/Assets/Mirage/Runtime/NetworkSceneManager.cs b/Assets/Mirage/Runtime/NetworkSceneManager.cs index f027c2ac66..9adac595ed 100644 --- a/Assets/Mirage/Runtime/NetworkSceneManager.cs +++ b/Assets/Mirage/Runtime/NetworkSceneManager.cs @@ -573,7 +573,7 @@ private void HostPlayerAuthenticated() // nornal client invokes start, then finish, even if scene is already loaded OnClientStartedSceneChange?.Invoke(ActiveScenePath, SceneOperation.Normal); - // server server and client copy of hoost player as ready + // server server and client copy of host player as ready Server.LocalClient.Player.SceneIsReady = true; Server.LocalPlayer.SceneIsReady = true;