Kryonet Fails about sending packet

Greetings.

I was setting up Kryonet, but ran into a problem. The connection is successful, but when a packet is sent (either custom or the TCP KeepAlive), it fails.

~file with client code

client.addListener(new ClientListener());
client.start();
client.connect(5000, ip, port);

~file with server code
server.bind(port);
server.addListener(new ServerListener());
server.start();

It connects correctly (it calls the connected listener on both ends). However, when the first packet is sent, it fails. This is true whether it is a registered “custom” type, or the default TCP KeepAlive. The moment it is sent, the client throws.

java.net.SocketException: Connection is closed.
at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:109)
at com.esotericsoftware.kryonet.Client.update(Client.java:247)
at com.esotericsoftware.kryonet.Client.run(Client.java:333)

This happens after 8 seconds - the default KeepAlive setting. If that is disabled (or set over the other default, 12), it gets disconnected as expected after 12 seconds. If the keep alive is set smaller, or a custom packet is sent (after being registered), it throws at that time instead.

The server shows no indication of a problem.

What might be the issue?