def reset(self, error_code: int) -> None:
        """
        Abruptly terminate the sending part of the QUIC stream.
        """
        assert self._reset_error_code is None, "cannot call reset() more than once"
        self._reset_error_code = error_code
        self.reset_pending = True

        # Prevent any more data from being sent or re-sent.
        self.buffer_is_empty = True

        Abruptly terminate the sending part of the QUIC stream.
        
src/aioquic/quic/stream.py