def goaway(error = :no_error, payload = nil)
      last_stream = if (max = @streams.max)
        max.first
      else
        0
      end

      send(type: :goaway, last_stream: last_stream,
           error: error, payload: payload)
      @state = :closed
      @closed_since = Time.now
    end
def goaway(error = :no_error, payload = nil)
      last_stream = if (max = @streams.max)
        max.first
      else
        0
      end

      send(type: :goaway, last_stream: last_stream,
           error: error, payload: payload)
      @state = :closed
      @closed_since = Time.now
    end
Sends a GOAWAY frame indicating that the peer should stop creating
 new streams for current connection.

 Endpoints MAY append opaque data to the payload of any GOAWAY frame.
 Additional debug data is intended for diagnostic purposes only and
 carries no semantic value. Debug data MUST NOT be persistently stored,
 since it could contain sensitive information.

 @param error [Symbol]
 @param payload [String]