Client.close() shuts down game

Hi all

when I try to close the clients connection, the whole game gets shut down. I just call this:
public void stop() {
if (client!=null) {
if (client.isConnected()) {

Is there a way to cleanly close the connection without shutting everything else down?
(I try to achieve the functionality of getting to the main menu after playing).
Did I miss something?

client.close() doesn’t shut the game down. You must still be doing networking somewhere and it causes an exception after the connection is closed and you don’t catch the error so your app closes.

That’s just a guess, though, since I can’t see that code. You are best equipped to figure that out. All I can say is that client.close() definitely doesn’t close the app on its own.

I made a little example in the meantime that works fine, with close() not shutting down the game, so the error probably lies in my code somewhere.
I´ll mark the topic as resolved since the bug has presumably nothing to do with a misunderstanding of jme.
Thank you for your answer, I´ll look into it.

Where do you implements your stop method?

I found the bug in my code:
The stop method was implemented nice and normal: When I click at “Back to Main Menu” the networking stops.
The failure was the code in
[java]public void clientDisconnected(Client c, DisconnectInfo info) {//}[/java]
This method gets called by client.close(); and somewhere in there the game was shut down.