title: WebSocket closes for no apparent reason
body: <p>Trying to use WebSockets. Connection from Client closes for no apparent reason. I've tracked it down to this line:</p>
  
  <pre><code>System.out.println("Will output");
  UserSession session = gameServer.getConnectedUser(message.getReceptor());
  System.out.println("Will not output");
  session.getConnection().send(JSONEncoder.create(message));
  </code></pre>
  
  <p>Instead it immediately jumps to the onClose() of the WebSocket Server, although im doing absolutely nothing with the connection itself in the Line <code>UserSession session = gameServer.getConnectedUser(message.getReceptor());</code></p>
  
  <p>I then went to onClose() and added this:</p>
  
  <pre><code>System.out.println("Code: " + code + " reason: " + reason + " remote: " + remote);
  Token token = getConnectedUser(conn).getToken();
  scheduler.deleteFor(token);
  Logger.logInfo("User " + token.toString() + " has quit");
  </code></pre>
  
  <p>"User xyz has quit" will get outputted, however the first System.out.println() will not get printed. Neither the reason, nor a code or anything else... What could cause such a connection close, and why is there no reason or code being given?</p>
  
  <p>Thanks!</p>