diff --git a/Assets/Mirror/Runtime/Transport/Tcp/Server.cs b/Assets/Mirror/Runtime/Transport/Tcp/Server.cs index 7b3ad770408..5b12a90bbd4 100644 --- a/Assets/Mirror/Runtime/Transport/Tcp/Server.cs +++ b/Assets/Mirror/Runtime/Transport/Tcp/Server.cs @@ -29,10 +29,8 @@ public class Server : Common public bool NoDelay = true; // connectionId counter - // (right now we only use it from one listener thread, but we might have - // multiple threads later in case of WebSockets etc.) - // HLAPI uses 0 for local connection, so our ids start with 1 - int counter = 1; + // 0 so first time we increment it will return 1 + int counter; // public next id function in case someone needs to reserve an id // (e.g. if hostMode should always have 0 connection and external