diff --git a/Assets/Mirage/Runtime/NetworkServer.cs b/Assets/Mirage/Runtime/NetworkServer.cs index 589d803b58..e78a88d889 100644 --- a/Assets/Mirage/Runtime/NetworkServer.cs +++ b/Assets/Mirage/Runtime/NetworkServer.cs @@ -396,8 +396,8 @@ private async UniTaskVoid AuthenticateAsync(INetworkPlayer player) public void SetAuthenticationFailedCallback(Action callback) { - if (_authFallCallback != null && callback != null) - if (logger.WarnEnabled()) logger.LogWarning($"Replacing old callback. Only 1 auth failed callback can be used at once"); + if (_authFallCallback != null && callback != null && logger.WarnEnabled()) + logger.LogWarning($"Replacing old callback. Only 1 auth failed callback can be used at once"); _authFallCallback = callback; }