It seems that if I close client with close-method, I can’t connect with it anymore.
Here’s how I get my problem:
- I connect to server (Connecting here works perfectly)
- After game ends, I call client’s close-method.
- I turn off server program
- I launch server program again
- I try to connect to new server exactly same way as in Step 1. This time however, it fails.
NOTE: I can connect to new server after restarting client-software
I noticed the following problem in logs:
WARNING: Root Cause: java.lang.IllegalStateException: Channels already exist.
WARNING: com.jme3.network.base.DefaultClient setPrimaryConnectors (DefaultClient.java:103)
WARNING: com.jme3.network.Network$NetworkClientImpl connectToServer (Network.java:188)
WARNING: com.jme3.network.Network$NetworkClientImpl connectToServer (Network.java:180)
It seems that closing client doesn’t remove the channels. I debugged my code in step 1 and 4 and noticed that client didn’t have any channels at step 1 but had 2 of them open in step 4.
Do I need to do something else besides closing client? For example, should I remove attached MessageListeners and StateListeners or do I need to create new Client-instance?
I’m using newest stable jMonkeyEngine platform on 64-bit Kubuntu 13.10.
Thanks in advance!