devoxin / SharpLink

Lavalink wrapper for Discord.Net written in C#
MIT License
27 stars 6 forks source link

Old players not properly removed #7

Closed Giggitybyte closed 6 years ago

Giggitybyte commented 6 years ago

When attempting to have the bot rejoin a voice channel after having it leave, an exception will be thrown stating that there is already an active connection, when there isn't. The bot is not in the voice channel.

LavalinkManager.LeaveAsync is called and will cause the bot to leave like normal. However, it seems that even after LeaveAsync is called, the player will still stick around and cause an exception to be thrown when you try to have it rejoin a voice channel.

Edit: Just took a look at LavalinkManager. There is no call to remove the old player from the Dictionary.