code: private boolean doSSLShutdown() {
          if (SSL.isInInit(ssl) != 0) {
              // Only try to call SSL_shutdown if we are not in the init state anymore.
              // Otherwise we will see 'error:140E0197:SSL routines:SSL_shutdown:shutdown while in init' in our logs.
              //
              // See also http://hg.nginx.org/nginx/rev/062c189fee20
              return false;
          }
          int err = SSL.shutdownSSL(ssl);
          if (err < 0) {
              int sslErr = SSL.getError(ssl, err);
              if (sslErr == SSL.SSL_ERROR_SYSCALL || sslErr == SSL.SSL_ERROR_SSL) {
                  if (logger.isDebugEnabled()) {
                      int error = SSL.getLastErrorNumber();
                      logger.debug("SSL_shutdown failed: OpenSSL error: {} {}", error, SSL.getErrorString(error));
                  }
                  // There was an internal error -- shutdown
                  shutdown();
                  return false;
              }
              SSL.clearError();
          }
          return true;
      }
docs: Attempt to call {@link SSL#shutdownSSL(long)}.
  @return {@code false} if the call to {@link SSL#shutdownSSL(long)} was not attempted or returned an error.