def close_connection(self, error_code=0):
        self.state_machine.process_input(ConnectionInputs.SEND_GOAWAY)

        f = GoAwayFrame(0)
        f.error_code = error_code
        f.last_stream_id = self.highest_inbound_stream_id
        self._prepare_for_sending([f])
Close a connection, emitting a GOAWAY frame.
dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py/H2Connection.close_connection