Fixing error when stop and return too fast, because of that there may be some threads downloading songs that will try to put songs in a already closed queue

This commit is contained in:
Rafael Vargas
2023-01-25 13:07:39 -03:00
parent 8dfa3579ae
commit afb223eadd
12 changed files with 51 additions and 15 deletions

View File

@@ -44,7 +44,7 @@ class PrevHandler(AbstractHandler):
# Send a prev command, together with the user voice channel
prevCommand = VCommands(VCommandsType.PREV, self.author.voice.channel.id)
queue = processInfo.getQueueToPlayer()
queue.put(prevCommand)
self.putCommandInQueue(queue, prevCommand)
embed = self.embeds.RETURNING_SONG()
return HandlerResponse(self.ctx, embed)