forked from External/mage
[load] one place server ping
This commit is contained in:
parent
e62f06cc54
commit
a746ca680b
8 changed files with 61 additions and 8 deletions
|
|
@ -1090,6 +1090,21 @@ public class SessionImpl implements Session {
|
|||
public void setEmbeddedMageServerAction(Action embeddedMageServerAction) {
|
||||
this.embeddedMageServerAction = embeddedMageServerAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean ping() {
|
||||
try {
|
||||
if (isConnected()) {
|
||||
server.ping(sessionId);
|
||||
}
|
||||
return true;
|
||||
} catch (MageException ex) {
|
||||
handleMageException(ex);
|
||||
} catch (Throwable t) {
|
||||
handleThrowable(t);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class MageAuthenticator extends Authenticator {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue