def on_closed_stream(self):
        if self.status == status.CLOSED:
            return

        self.status = status.CLOSED
        if self.on_disconnect:
            try:
                self.on_disconnect()
            except Exception:
                logger.error('ERROR in on_disconnect() callback',
                             exc_info=True)
dataset/ETHPy150Open paolo-losi/stormed-amqp/stormed/connection.py/Connection.on_closed_stream/original