public void close ( ) throws IOException , InterruptedException { channel . close ( ) ; channel . join ( ) ; if ( ownsPool ) pool . shutdown ( ) ; for ( Closeable c : closables ) c . close ( ) ; }
Shuts down the channel and closes the underlying connection .