code: @Override
      public void onShutdown() {
          if (log.isDebugEnabled()) {
              log.debug("Shutting down {}", this.toString());
          }
          switch (closed.get()) {
              case NOT_CLOSED: {
                  // The other peer did not send a GO_AWAY, no need to be gentle.
                  if (log.isDebugEnabled()) {
                      log.debug("Abrupt close for {}", this.toString());
                  }
                  abort(new ClosedChannelException());
                  break;
              }
              case LOCALLY_CLOSED: {
                  // We have closed locally, and only shutdown
                  // the output; now queue a disconnect.
                  control(null, Callback.NOOP, new DisconnectFrame());
                  break;
              }
              case REMOTELY_CLOSED: {
                  // Nothing to do, the GO_AWAY frame we
                  // received will close the connection.
                  break;
              }
              default: {
                  break;
              }
          }
      }
docs: A typical close by a remote peer involves a GO_AWAY frame followed by TCP FIN.
  This method is invoked when the TCP FIN is received, or when an exception is
  thrown while reading, and we check the close state to act appropriately:
  <ul>
  <li>NOT_CLOSED: means that the remote peer did not send a GO_AWAY (abrupt close)
  or there was an exception while reading, and therefore we terminate.</li>
  <li>LOCALLY_CLOSED: we have sent the GO_AWAY to the remote peer, which received
  it and closed the connection; we queue a disconnect to close the connection
  on the local side.
  The GO_AWAY just shutdown the output, so we need this step to make sure the
  connection is closed. See {@link #close(int, String, Callback)}.</li>
  <li>REMOTELY_CLOSED: we received the GO_AWAY, and the TCP FIN afterwards, so we
  do nothing since the handling of the GO_AWAY will take care of closing the
  connection. See {@link #onGoAway(GoAwayFrame)}.</li>
  </ul>
  
  @see #onGoAway(GoAwayFrame)
  @see #close(int, String, Callback)
  @see #onIdleTimeout()