protected void closeSocket ( ) { if ( _channel == null ) { return ; } log . debug ( "Closing channel " + this + "." ) ; try { _channel . close ( ) ; } catch ( IOException ioe ) { log . warning ( "Error closing connection" , "conn" , this , "error" , ioe ) ; } // clear out our references to prevent repeat closings _channel = null ; }
Closes the socket associated with this connection . This happens when we receive EOF are requested to close down or when our connection fails .