Skip to content

Commit

Permalink
fix(NetworkServer): Improved logging in OnCommandMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGadget1024 committed Dec 12, 2024
1 parent ea2af34 commit ca75fd9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Assets/Mirror/Core/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,13 @@ static void OnCommandMessage(NetworkConnectionToClient conn, CommandMessage msg,
return;
}

Debug.LogWarning("Command received while client is not ready.\nThis may be ignored if client intentionally set NotReady.");
if (RemoteProcedureCalls.GetFunctionMethodName(msg.functionHash, out string method))
{
Debug.LogWarning($"Command {method} received from {conn} when client was not ready.\nThis may be ignored if client intentionally set NotReady.");
return;
}

Debug.LogWarning($"Command received from {conn} while client is not ready.\nThis may be ignored if client intentionally set NotReady.");
}
return;
}
Expand Down

0 comments on commit ca75fd9

Please sign in to comment.