Skip to content

Commit

Permalink
fix: first connection id = 1 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach authored Feb 6, 2020
1 parent ca824bf commit 891dab9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Assets/Mirror/Runtime/Transport/Tcp/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 891dab9

Please sign in to comment.