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 select : 100% cpu (round 3) #21

Closed ghost closed 10 years ago

ghost commented 10 years ago

From Piladong@gmail.com on June 01, 2012 18:03:26

Problem similar to issue#19 The select still returns something !=0 when there is no network activity The exception line 320 is thrown : https://code.google.com/p/kryonet/source/browse/trunk/kryonet/src/com/esotericsoftware/kryonet/Server.java?spec=svn111&r=111#320 The sleep is not reached because select!=0 and the connection is not closed because of the exception thrown. maybe the connection needs to be closed there ? I don't know if i can easily reproduce the problem

Original issue: http://code.google.com/p/kryonet/issues/detail?id=20

ghost commented 10 years ago

From nathan.s...@gmail.com on June 01, 2012 14:02:49

This issue was closed by revision r113.

Status: Fixed

ghost commented 10 years ago

From nathan.s...@gmail.com on June 01, 2012 14:03:26

I think that should do it, thanks. I don't think there are any more scenarios where a selected key is not handled.

ghost commented 10 years ago

From Piladong@gmail.com on June 02, 2012 06:58:21

You forgot a 'println' line 165

ghost commented 10 years ago

From nathan.s...@gmail.com on June 02, 2012 14:48:51

Wow, I'm a noob. :(