Fix race condition when transitioning from plugin source (#2758)
authorsprocket-9 <sprocketnumber9@gmail.com>
Sat, 6 Dec 2025 19:23:57 +0000 (19:23 +0000)
committerGitHub <noreply@github.com>
Sat, 6 Dec 2025 19:23:57 +0000 (20:23 +0100)
music_assistant/controllers/players/player_controller.py

index aec1624c96e52287f769a0027c0f2ba5fd86916f..ade539accdea04546857f5a0bed15142057e446d 100644 (file)
@@ -889,7 +889,7 @@ class PlayerController(CoreController):
             with suppress(PlayerCommandFailed, RuntimeError):
                 # just try to stop (regardless of state)
                 await self.cmd_stop(player_id)
-                await asyncio.sleep(0.5)  # small delay to allow stop to process
+                await asyncio.sleep(2)  # small delay to allow stop to process
         # check if source is a pluginsource
         # in that case the source id is the instance_id of the plugin provider
         if plugin_prov := self.mass.get_provider(source):