EmbarkStudios / discord-sdk

An open implementation of the Discord Game SDK in Rust
Apache License 2.0
150 stars 10 forks source link

IO handler shutdown hangs tasks #32

Open winrg opened 1 year ago

winrg commented 1 year ago

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

Jake-Shadle commented 1 year ago

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.