angelobreuer / Lavalink4NET

Lavalink4NET is a Lavalink wrapper with node clustering, caching and custom players for .NET with support for Discord.Net, DSharpPlus, Remora, and NetCord.
https://lavalink4net.angelobreuer.de/
MIT License
150 stars 27 forks source link

When Lavalink4Net tries to resolve player on unavailable node it block all Discord.Net handling #173

Closed SKProCH closed 2 weeks ago

SKProCH commented 2 weeks ago

Describe the bug It we add some node which not available (e.g. shutdowned), and bot tries to resolve player for it, Lavalink4Net will block all discord net event processing loop.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Lavalink4NET.Samples.Cluster'. No not change nodes addresses, since nodes should be unavailable anyway.
  2. Provide token, launch
  3. Try to execute play two times
  4. After first try bot will stop the Discord.Net message processing

Expected behavior It shouldn't block message processing.

Screenshots image
image

(please complete the following information):

Additional context Lavalink tries to handle the voice connected event and send it to node, for which it will wait for node connection. But if the node is unavailable is will never happen.

SKProCH commented 2 weeks ago

Currently this PR will solve this problem, but i think what we should actually dispose player handle it connection unavailable for certain amount of time. But this is another PR, since currently i've don't have a time to implement it properly.

angelobreuer commented 2 weeks ago

Fixed by #174