def abortConnection(self):
        """
        Aborts the connection immediately, dropping any buffered data.

        @since: 11.1
        """
        if self.disconnected or self._aborting:
            return
        self._aborting = True
        self.stopReading()
        self.stopWriting()
        self.doRead = lambda *args, **kwargs: None
        self.doWrite = lambda *args, **kwargs: None
        self.reactor.callLater(0, self.connectionLost,
                               failure.Failure(error.ConnectionAborted()))

        Aborts the connection immediately, dropping any buffered data.

        @since: 11.1
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/tcp.py