protected void closeAgent() throws IOException { if (agent != null) { try { agent.close(); } finally { agent = null; } } }
protected void closeAgent() throws IOException { if (agent != null) { try { agent.close(); } finally { agent = null; } } }
private void closeAgent() throws IOException { if (agent == null) { return; } try { agent.close(); } finally { agent = null; } }
private void closeImmediately0() { // We need to close the channel immediately to remove it from the // server session's channel table and *not* send a packet to the // client. A notification was already sent by our caller, or will // be sent after we return. try { if ((agent != null) && agent.isOpen()) { try { agent.close(); } catch (IOException e) { log.error("closeImmediately0({}) Failed ({}) to close open local agent: {}", this, e.getClass().getSimpleName(), e.getMessage()); } } } finally { super.close(true); } }
private void closeImmediately0() { // We need to close the channel immediately to remove it from the // server session's channel table and *not* send a packet to the // client. A notification was already sent by our caller, or will // be sent after we return. try { if ((agent != null) && agent.isOpen()) { try { agent.close(); } catch (IOException e) { log.error("closeImmediately0({}) Failed ({}) to close open local agent: {}", this, e.getClass().getSimpleName(), e.getMessage()); } } } finally { super.close(true); } }
@Override public void handleEof() throws IOException { // Close agent forwarding channel try { if ((agent != null) && agent.isOpen()) { agent.close(); } } finally { super.handleEof(); } }
public void close() { selectable = false; selector.wakeup(); // forcibly close remaining sockets for (SelectionKey key : selector.keys()) { if (key != null) { safelyClose(key.channel()); } } safelyClose(selector); agent.close(); safelyClose(channel); if (authSocket != null) { FileUtils.deleteQuietly(new File(authSocket)); } }
@Override public void handleEof() throws IOException { // Close agent forwarding channel try { if ((agent != null) && agent.isOpen()) { agent.close(); } } finally { super.handleEof(); } }
@Override public void close() throws IOException { IOException err = null; try { agent.close(); } catch (IOException e) { err = e; } Socket.close(handle); try { if ((agentThread != null) && (!agentThread.isDone())) { agentThread.cancel(true); } } finally { agentThread = null; } CloseableExecutorService executor = getExecutorService(); if ((executor != null) && (!executor.isShutdown())) { Collection<?> runners = executor.shutdownNow(); if (log.isDebugEnabled()) { log.debug("Shut down runners count=" + GenericUtils.size(runners)); } } if (err != null) { throw err; } }
@Override public void close() throws IOException { IOException err = null; try { agent.close(); } catch (IOException e) { err = e; } Socket.close(handle); try { if ((agentThread != null) && (!agentThread.isDone())) { agentThread.cancel(true); } } finally { agentThread = null; } CloseableExecutorService executor = getExecutorService(); if ((executor != null) && (!executor.isShutdown())) { Collection<?> runners = executor.shutdownNow(); if (log.isDebugEnabled()) { log.debug("Shut down runners count=" + GenericUtils.size(runners)); } } if (err != null) { throw err; } }