forked from External/mage
Fixed some exception problems.
This commit is contained in:
parent
9eb71e24be
commit
6b90c1fd7f
7 changed files with 32 additions and 19 deletions
|
|
@ -66,6 +66,7 @@ public class Session {
|
|||
private final Date timeConnected;
|
||||
private boolean isAdmin = false;
|
||||
private final AsynchInvokerCallbackHandler callbackHandler;
|
||||
private boolean error = false;
|
||||
|
||||
private final ReentrantLock lock;
|
||||
|
||||
|
|
@ -370,10 +371,14 @@ public class Session {
|
|||
}
|
||||
|
||||
public void fireCallback(final ClientCallback call) {
|
||||
if (error) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
call.setMessageId(messageId++);
|
||||
callbackHandler.handleCallbackOneway(new Callback(call));
|
||||
} catch (HandleCallbackException ex) {
|
||||
error = true; // to reduce repeated SESSION CALLBACK EXCEPTION
|
||||
UserManager.instance.getUser(userId).ifPresent(user -> {
|
||||
user.setUserState(User.UserState.Disconnected);
|
||||
logger.warn("SESSION CALLBACK EXCEPTION - " + user.getName() + " userId " + userId + " - cause: " + getBasicCause(ex).toString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue