As the title states - the Task returned by SocketIO.DisconnectAsync is completed before the disconnect process is completed, which leads to unexpected callbacks to be called afterward.
Presumably, the fix involves making InvokeDisconnect return Task and awaiting the call to it in DisconnectAsync().
As the title states - the Task returned by SocketIO.DisconnectAsync is completed before the disconnect process is completed, which leads to unexpected callbacks to be called afterward.
Presumably, the fix involves making InvokeDisconnect return Task and awaiting the call to it in DisconnectAsync().