Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server disposing #82

Open
ghost opened this issue Jan 20, 2015 · 1 comment
Open

Server disposing #82

ghost opened this issue Jan 20, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 20, 2015

Hi should we not dispose the server?

I open the connection like in the readme explained and then when I close the app I get the error

00:00  INFO: [kryonet] Server opened.
00:02  INFO: [kryonet] Server closed.
Exception in thread "Server" java.nio.channels.ClosedSelectorException
    at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
    at sun.nio.ch.SelectorImpl.select(Unknown Source)
    at com.esotericsoftware.kryonet.Server.update(Server.java:168)
    at com.esotericsoftware.kryonet.Server.run(Server.java:372)
    at java.lang.Thread.run(Unknown Source)

If I remove

@Override
public void onDispose() {
    try {
        server.dispose();
    }
    catch (IOException e) {
        e.printStackTrace();
    }
}

there are no errors.

@payne911
Copy link

Same thing here, on the Client side. Calling client.dispose() inside libGDX's dispose() method actually hangs for several minutes before letting my game close.

If I remove client.dispose(), everything works fine.

Under what circumstances are we stupposed to dispose ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant