/** * Closes the connection to the remote peer if connected. */ private void disconnect() { disconnect(false, false, null); }
/** * Closes this transceiver and disconnects from the remote peer. * Cancels all pending RPCs and sends an IOException to all pending callbacks. * @param awaitCompletion if true, will block until the close has completed. */ public void close(boolean awaitCompletion) { try { // Close the connection: stopping = true; disconnect(awaitCompletion, true, null); } finally { // Shut down all thread pools to exit. channelFactory.releaseExternalResources(); } }
/** * Closes the connection to the remote peer if connected. */ private void disconnect() { disconnect(false, false, null); }
/** * Closes this transceiver and disconnects from the remote peer. * Cancels all pending RPCs and sends an IOException to all pending callbacks. * @param awaitCompletion if true, will block until the close has completed. */ public void close(boolean awaitCompletion) { try { // Close the connection: stopping = true; disconnect(awaitCompletion, true, null); } finally { // Shut down all thread pools to exit. channelFactory.releaseExternalResources(); } }