Changes to connect messages, added some debug messages to narrow down server user handling bug.

This commit is contained in:
LevelX2 2014-04-14 23:11:34 +02:00
parent cf4913ae96
commit d53a3245d6
8 changed files with 63 additions and 31 deletions

View file

@ -209,9 +209,11 @@ public class TableManager {
public void leaveTable(UUID userId, UUID tableId) {
if (controllers.containsKey(tableId)) {
// table not started yet and user is the owner, remove the table
if (isTableOwner(tableId, userId)
&& (getTable(tableId).getState().equals(TableState.WAITING)
|| getTable(tableId).getState().equals(TableState.STARTING))) {
Table table = getTable(tableId);
if (table != null
&& isTableOwner(tableId, userId)
&& (table.getState().equals(TableState.WAITING)
|| table.getState().equals(TableState.STARTING))) {
removeTable(tableId);
} else {