EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.82k stars 419 forks source link

Server nextConnectionID overflow #119

Closed ghost closed 8 years ago

ghost commented 8 years ago

Correct me if I'm wrong, but in Server.java, for every connection made, nextConnectionID goes up by 1. If this continues for long enough, the value will reach it maximum (2,147,483,647) and then flip to its minimum (- 2,147,483,648). This will count up again and eventually become -1, which is used to identify Connections which have never been connected to. I did not find any other problems that occur with negative Connection ID's.