discord-sdk icon indicating copy to clipboard operation
discord-sdk copied to clipboard

IO handler shutdown hangs tasks

Open winrg opened this issue 2 years ago • 1 comments

Describe the bug Alright, I've figured it out! This bug specifically occurs when anything .awaits a Discord request, and the IO handler restarts for whatever reason. The awaits hang perpetually.

To Reproduce Steps to reproduce the behavior:

  1. Write some code which does the following:
    1. Connects to discord
    2. Sends a periodical request of some kind, I've been using activity updates.
    3. Make sure it logs when it does, or in some way shows that it's running
  2. Run it with Discord open
  3. Kill discord and reopen it
  4. Note how the logging suddenly pauses

Expected behavior For an error to be returned, or, ideally, the request to be transparently resent in some way.

Device: ArchLinux, kernel 6.1.19, rustc 1.66.0-nightly

winrg avatar Mar 28 '23 21:03 winrg

I don't have time to work on this atm but I agree it's an issue. Would accept a PR to fix/improve this.

Jake-Shadle avatar Mar 31 '23 09:03 Jake-Shadle