Fix race condition for resume after announcements (#2798)
authorMarvin Schenkel <marvinschenkel@gmail.com>
Fri, 12 Dec 2025 14:56:31 +0000 (15:56 +0100)
committerGitHub <noreply@github.com>
Fri, 12 Dec 2025 14:56:31 +0000 (15:56 +0100)
music_assistant/providers/airplay/protocols/airplay2.py
music_assistant/providers/airplay/protocols/raop.py

index e090ff46a8e95118ac4861359007d3c981e356f1..19dd639519dc233d8592ef90ca59af6c0a7b088c 100644 (file)
@@ -160,4 +160,5 @@ class AirPlay2Stream(AirPlayProtocol):
 
         # ensure we're cleaned up afterwards (this also logs the returncode)
         if not self._stopped:
-            await self.stop()
+            self._stopped = True
+            self.player.set_state_from_stream(state=PlaybackState.IDLE, elapsed_time=0)
index 1396d38a51f08ae59c5122219f9081ef87972e62..f6413fb11e7861780581ac578b840f0152a2c4d6 100644 (file)
@@ -198,4 +198,5 @@ class RaopStream(AirPlayProtocol):
 
         logger.debug("CLIRaop stderr reader ended")
         if not self._stopped:
+            self._stopped = True
             self.player.set_state_from_stream(state=PlaybackState.IDLE, elapsed_time=0)