public void close(){
  if (lock != null) {
    lock.lock();
  }
  this.connected=false;
  try {
    skip();
  }
 catch (  Exception e) {
  }
  try {
    if (options.cachePrepStmts) {
      serverPrepareStatementCache.clear();
    }
    close(packetFetcher,writer,socket);
  }
 catch (  Exception e) {
  }
 finally {
    if (lock != null) {
      lock.unlock();
    }
  }
}

public void close ( ) { if ( lock != null ) { lock . lock ( ) ; } this . connected = false ; try { skip ( ) ; } catch ( Exception e ) { } try { if ( options . cachePrepStmts ) { serverPrepareStatementCache . clear ( ) ; } close ( packetFetcher , writer , socket ) ; } catch ( Exception e ) { } finally { if ( lock != null ) { lock . unlock ( ) ; } } }
closes socket and stream readers / writers attempts graceful shutdown .
