public boolean isHealthy(boolean doExtensiveChecks){
  if (socket.isClosed() || socket.isInputShutdown() || socket.isOutputShutdown()) {
    return false;
  }
  if (framedConnection != null) {
    return true;
  }
  if (doExtensiveChecks) {
    try {
      int readTimeout=socket.getSoTimeout();
      try {
        socket.setSoTimeout(1);
        if (source.exhausted()) {
          return false;
        }
        return true;
      }
  finally {
        socket.setSoTimeout(readTimeout);
      }
    }
 catch (    SocketTimeoutException ignored) {
    }
catch (    IOException e) {
      return false;
    }
  }
  return true;
}

public boolean isHealthy ( boolean doExtensiveChecks ) { if ( socket . isClosed ( ) || socket . isInputShutdown ( ) || socket . isOutputShutdown ( ) ) { return false ; } if ( framedConnection != null ) { return true ; } if ( doExtensiveChecks ) { try { int readTimeout = socket . getSoTimeout ( ) ; try { socket . setSoTimeout ( 1 ) ; if ( source . exhausted ( ) ) { return false ; } return true ; } finally { socket . setSoTimeout ( readTimeout ) ; } } catch ( SocketTimeoutException ignored ) { } catch ( IOException e ) { return false ; } } return true ; }
returns true if this connection is ready to host new streams .
