code: def onClose(self, wasClean):
          
          self.log.error('lost connection to crossbar on session %' + str(self.session_id))
          for task in asyncio.Task.all_tasks():
              task.cancel()
          asyncio.get_event_loop().stop()
docs: Disconnect when connection to message
          broker is lost