EsotericSoftware / EsotericSoftware/kryonet

dispatchListener removes connections too early

Open
#84 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

``` java
public void disconnected (Connection connection) {
removeConnection(connection);
Listener[] listeners = Server.this.listeners;
for (int i = 0, n = listeners.length; i < n; i++)
listeners[i].disconnected(connection);
}
```

shouldn't the connection be removed only after all the listeners were called?
if the connection is removed before, the other listeners may not have the data the need, for example the connection's address.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.