]> git.tuebingen.mpg.de Git - paraslash.git/commit
audiod: Avoid delay in status transition from standby to on.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 25 Nov 2021 19:25:43 +0000 (20:25 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 14 Feb 2022 15:29:25 +0000 (16:29 +0100)
commit30f67968151619955b2e998c5ce1d4183055fcfa
tree64a467e723653a27bc63c1ba13e3d8b4bda103b9
parent88bf6848d1c58ad0e0d9b62d7da2a81cea5bf0ff
audiod: Avoid delay in status transition from standby to on.

In close_receiver() we invalidate the current audio format value
to prevent the receiver from re-starting too quickly. See commit
2d61a8005c74 (audiod: Invalidate current audio format on close)
from seven years ago for details.

This invalidation happens in particular when the receiver is closed
because audiod was told to enter standby mode. If audiod is switched
back on shortly thereafter, no receiver can't be started because we
forgot the current audio format and must wait up to one minute until
the next status item dump arrives from the server which re-initializes
the current audio format value.

Fix this flaw by only invalidating the current audio format when
audiod operates in "on" mode.

Fixes: 2d61a8005c74
audiod.c