code: @Override
      public void onGoAway(final GoAwayFrame frame) {
          if (log.isDebugEnabled()) {
              log.debug("Received {}", frame.toString());
          }
          while (true) {
              CloseState current = closed.get();
              switch (current) {
                  case NOT_CLOSED: {
                      if (closed.compareAndSet(current, CloseState.REMOTELY_CLOSED)) {
                          // We received a GO_AWAY, so try to write
                          // what's in the queue and then disconnect.
                          notifyClose(this, frame, new DisconnectCallback());
                          return;
                      }
                      break;
                  }
                  default: {
                      if (log.isDebugEnabled()) {
                          log.debug("Ignored {}, already closed", frame.toString());
                      }
                      return;
                  }
              }
          }
      }
docs: This method is called when receiving a GO_AWAY from the other peer.
  We check the close state to act appropriately:
  <ul>
  <li>NOT_CLOSED: we move to REMOTELY_CLOSED and queue a disconnect, so
  that the content of the queue is written, and then the connection
  closed. We notify the application after being terminated.
  See <code>HTTP2Session.ControlEntry#succeeded()</code></li>
  <li>In all other cases, we do nothing since other methods are already
  performing their actions.</li>
  </ul>
  
  @param frame the GO_AWAY frame that has been received.
  @see #close(int, String, Callback)
  @see #onShutdown()
  @see #onIdleTimeout()