def reset_stream(self, stream_id, error_code=0):
        self.state_machine.process_input(ConnectionInputs.SEND_RST_STREAM)
        stream = self._get_stream_by_id(stream_id)
        frames = stream.reset_stream(error_code)
        self._prepare_for_sending(frames)
        self._reset_streams.add(stream_id)
        del self.streams[stream_id]
Reset a stream.
dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py/H2Connection.reset_stream