Skip to content

Commit 7fc8fd7

Browse files
Change event_queue.get() to be a blocking call, meaning that any new events in the queue will instantly reflect their requested changes rather than waiting for 1-2 seconds due to the time.sleep()
1 parent f4befce commit 7fc8fd7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

streams/volume_synchronizer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def on_child_event(self, event_type):
135135
def watcher_loop(self):
136136
while True:
137137
try:
138-
event = self.event_queue.get(timeout=2)
138+
event = self.event_queue.get()
139139
if event == "stream_volume_changed":
140140
self.vol_set_point = self.amplipi.set_vol(self.stream.volume, self.vol_set_point)
141141
elif event == "amplipi_volume_changed":
@@ -148,4 +148,3 @@ def watcher_loop(self):
148148
except Exception as e:
149149
self.logger.exception(f"Exception: {e}")
150150
continue
151-
sleep(1)

0 commit comments

Comments
 (0)