Skip to content
Snippets Groups Projects
Commit 69e8de3e authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Fix NPE

parent 4015a255
Branches
Tags
No related merge requests found
......@@ -111,6 +111,11 @@ public class ARSnovaSocketIOServer {
@Override
public void onData(SocketIOClient client, Session session, AckRequest ackSender) {
User u = userService.getUser2SocketId(client.getSessionId());
if (null == u) {
LOGGER.info("Client {} requested to join session but is not mapped to a user", client.getSessionId());
return;
}
String oldSessionKey = userService.getSessionForUser(u.getUsername());
if (session.getKeyword() == oldSessionKey) {
return;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment