Deadlock with DiscordClient.Dispose().
Created by: Neuheit
Summary
Calling DiscordClient.Dispose()
immediately after ready will create a deadlock.
Details
This only occurs when calling Dispose immediately after ready, and works fine when calling it immediately after ConnectAsync or waiting until after ready.
Steps to reproduce
- Create a discord client and call ConnectAsync()
- Wait for ready to fire in the same method.
- Call Dispose().
- Observe that the rest of the main method is not called.