[KryoNet] What works in earlier versions doesnt in 2.20

Was wondering why a piece of code worked in KryoNet 2.12 but not 2.18 and 2.20

I put the problem in the KryoNet issues section
but i looked through some of the other issues and none of them have been answered so The issues board may not be monitored anymore

So i thought i would try my luck here
https://code.google.com/p/kryonet/issues/detail?id=36

Thanks in advance

I haven’t had time to respond to Kryo or KryoNet posts for a few weeks. Set logging to DEBUG or TRACE on both client and server and see what that shows. The log you posted doesn’t show the error, probably the error is at the other end of the connection.

This is the message with Level trace i got from the client


00:00  INFO: Please enter the ip
00:00  INFO: Connecting: /127.0.0.1:54555
00:00  INFO: [kryonet] Connection 1 connected: /127.0.0.1
00:00  INFO: [Client] You have connected.
00:00 TRACE: [kryo] Write class 14: com.Fawaz.Test.Packet$Packet0LoginRequest

This is what i got from the server


00:00  INFO: [kryonet] Server opened.
00:00 TRACE: [kryonet] Server thread started.
00:09 DEBUG: [kryonet] Port 54555/TCP connected to: /127.0.0.1:49957
00:09 TRACE: [kryonet] Connection listener added: com.esotericsoftware.kryonet.Server$1
00:09 TRACE: [kryo] Write class 9: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP
00:09 DEBUG: [kryo] Write: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP
00:09 TRACE: [kryo] Write field: connectionID (com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP)
00:09 TRACE: [kryo] Write int: 1
00:09 TRACE: [kryo] Object graph complete.
00:09 TRACE: [kryonet] Connection 1 sent TCP: RegisterTCP (6)
00:09  INFO: [kryonet] Connection 1 connected: /127.0.0.1
00:09  INFO: [SERVER] Someone is trying to connect.
00:10 TRACE: [kryonet] Unable to read TCP from: Connection 1
java.io.IOException: An existing connection was forcibly closed by the remote host
	at sun.nio.ch.SocketDispatcher.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(Unknown Source)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
	at sun.nio.ch.IOUtil.read(Unknown Source)
	at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
	at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:107)
	at com.esotericsoftware.kryonet.Server.update(Server.java:192)
	at com.esotericsoftware.kryonet.Server.run(Server.java:350)
	at java.lang.Thread.run(Unknown Source)
00:10  INFO: [SERVER] Someone is trying to disconnect.
00:10  INFO: [kryonet] Connection 1 disconnected.

I guess the better question is the why i am getting an IOException at 0:10 in KryoNet 2.20 but not 2.12

Seems like the error is on the client, strange there is no exception. It doesn’t matter if it worked in 2.12. It doesn’t work now, so you’ll need to debug it.