EsotericSoftware / EsotericSoftware/kryonet
Server disposing
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 411
- PR merge metrics
- No merged PRs in 30d
Description
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
``` java
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
``` java
@Override
public void onDispose() {
try {
server.dispose();
}
catch (IOException e) {
e.printStackTrace();
}
}
```
there are no errors.
Contributor guide
Assessment
This issue has not been assessed yet.