def connectionLost(self, reason):
        """
        Forward the connection lost event, flushing remaining data from the
        decompressor if any.
        """
        try:
            rawData = self._zlibDecompress.flush()
        except zlib.error:
            raise ResponseFailed([reason, Failure()], self._response)
        if rawData:
            self.original.dataReceived(rawData)
        self.original.connectionLost(reason)

        Forward the connection lost event, flushing remaining data from the
        decompressor if any.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/client.py