forked from External/mage
Improved reconnect and tournament handling. Reconnect time is now shown for disconneted players on player list and tournament panel. You can now reconnect (during 3 minutes) to a tournament also if meanwhile new game (after sideboarding ended) or round was started. Conceding the complete match in a tournament can no longer result in a draw, if you won games before. Quitting a tournament does now always end all active games of that quitting player.
This commit is contained in:
parent
c76529bf91
commit
9ff5bcbd92
29 changed files with 282 additions and 109 deletions
|
|
@ -109,6 +109,7 @@ public class MageServerImpl implements MageServer {
|
|||
LogServiceImpl.instance.log(LogKeys.KEY_WRONG_VERSION, userName, version.toString(), Main.getVersion().toString(), sessionId);
|
||||
throw new MageVersionException(version, Main.getVersion());
|
||||
}
|
||||
logger.info(new StringBuilder("RegisterClient - userName: ").append(userName).append(" sessionId = ").append(sessionId));
|
||||
return SessionManager.getInstance().registerUser(sessionId, userName);
|
||||
} catch (Exception ex) {
|
||||
if (ex instanceof MageVersionException) {
|
||||
|
|
@ -333,16 +334,16 @@ public class MageServerImpl implements MageServer {
|
|||
return SessionManager.getInstance().extendUserSession(sessionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterClient(final String sessionId) throws MageException {
|
||||
execute("deregisterClient", sessionId, new Action() {
|
||||
@Override
|
||||
public void execute() {
|
||||
SessionManager.getInstance().disconnect(sessionId, true);
|
||||
logger.debug("Client deregistered ...");
|
||||
}
|
||||
});
|
||||
}
|
||||
// @Override
|
||||
// public void deregisterClient(final String sessionId) throws MageException {
|
||||
// execute("deregisterClient", sessionId, new Action() {
|
||||
// @Override
|
||||
// public void execute() {
|
||||
// SessionManager.getInstance().disconnect(sessionId, true);
|
||||
// logger.debug("Client deregistered ...");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void startMatch(final String sessionId, final UUID roomId, final UUID tableId) throws MageException {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue