private void logoff() { if (derived) { return; //not the right place to kill the session } try { //make a best effort to send the logoff Future<?> writeFuture = this.getService(ILogon.class).logoff(); if (writeFuture != null) { writeFuture.get(5000, TimeUnit.MILLISECONDS); } } catch (Exception e) { //ignore } }
private void logoff() { if (this.logonResult == null) { return; } disconnect(); try { //make a best effort to send the logoff, and wait a small amount for a response //this will ensure a "proper" session termination on the server side, //rather than implicit closure when the socket is closed Future<?> writeFuture = this.serverInstance.getService(ILogon.class).logoff(); writeFuture.get(100, TimeUnit.MILLISECONDS); } catch (Exception e) { //ignore } }
private void logoff() { if (this.logonResult == null) { return; } disconnect(); try { //make a best effort to send the logoff, and wait a small amount for a response //this will ensure a "proper" session termination on the server side, //rather than implicit closure when the socket is closed Future<?> writeFuture = this.serverInstance.getService(ILogon.class).logoff(); writeFuture.get(100, TimeUnit.MILLISECONDS); } catch (Exception e) { //ignore } }
@Override public void run() { try { csr.getClientService(ILogon.class).logoff(); } catch (Exception e) { LogManager.logDetail(LogConstants.CTX_TRANSPORT, e, "Exception closing client instance"); //$NON-NLS-1$ } } });