mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
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:
@@ -75,7 +75,8 @@ class PlayHandler(AbstractHandler):
|
||||
processLock.release()
|
||||
queue = processInfo.getQueueToPlayer()
|
||||
playCommand = VCommands(VCommandsType.PLAY, None)
|
||||
queue.put(playCommand)
|
||||
self.putCommandInQueue(queue, playCommand)
|
||||
|
||||
else:
|
||||
processManager.resetProcess(self.guild, self.ctx)
|
||||
embed = self.embeds.PLAYER_RESTARTED()
|
||||
@@ -135,7 +136,7 @@ class PlayHandler(AbstractHandler):
|
||||
acquired = processLock.acquire(timeout=self.config.ACQUIRE_LOCK_TIMEOUT)
|
||||
if acquired:
|
||||
playlist.add_song(song)
|
||||
queue.put(playCommand)
|
||||
self.putCommandInQueue(queue, playCommand)
|
||||
processLock.release()
|
||||
else:
|
||||
processManager.resetProcess(self.guild, self.ctx)
|
||||
|
||||
Reference in New Issue
Block a user