I just started using Autobahn wamp client, and I am trying to execute an asyncio coroutine on leave. This is the code:
def leave(self, reason=None, log_message=None):
result = super().leave(reason=reason, log_message=log_message)
async def ask_leave(self, result):
#do leaving asyncio stuff
When I run this code everything seems to run fine, except that onDisconnect does not get triggered like it does if I do not override the leave method. So I would like to know what am I doing wrong or what is the best way of running an asyncio coroutine when the client is leaving.