[Solved] KryoNet Auto Pinging (KeepAlive)

In my program KryoNet sends Pings itself way too often, about 50 times per ms (!) i printed them to the console with timestamps.
That’s way too often, can I somehow reduce the amount?


		con.setKeepAliveTCP(1000);
		con.setTimeout(1000);

didn’t change anything (called in the Serverlistener receive code) and i couldn’t find a method in the server object itself.
couldn’t find anything through google either :c

edit: I called con.updateReturnTripTime() in my received method, so it just sends the Ping messages arround, fixed :smiley:

Hi,
That’s unusual. In the API it says that the delay is measured in milliseconds, and 1000ms is one second which seems reasonable.


The default is 8000ms which is 8s.
Perhaps the problem is that the pings have been stored up and the client doesn’t receive them for a while. And then when the client finally receives the messages they’re all together, when in fact they were sent 1s apart.
Networking problems are hard to debug.
Good luck