Uhh, might want to handle PresentsSession.getInetAddress returning null for disconnected clients
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5687 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -190,7 +190,11 @@ public class ClientManager
|
|||||||
List<PresentsSession> sessions = Lists.newArrayListWithExpectedSize(1);
|
List<PresentsSession> sessions = Lists.newArrayListWithExpectedSize(1);
|
||||||
synchronized (_usermap) {
|
synchronized (_usermap) {
|
||||||
for (PresentsSession session : _usermap.values()) {
|
for (PresentsSession session : _usermap.values()) {
|
||||||
if (Arrays.equals(addr, session.getInetAddress().getAddress())) {
|
InetAddress sessionAddr = session.getInetAddress();
|
||||||
|
if (sessionAddr == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Arrays.equals(addr, sessionAddr.getAddress())) {
|
||||||
sessions.add(session);
|
sessions.add(session);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user