Skip to content

Commit

Permalink
Fix 'Producer was not unregistered' error (#17569)
Browse files Browse the repository at this point in the history
Follows on from #17567
  • Loading branch information
erikjohnston authored Aug 14, 2024
1 parent a51daff commit 1892ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/17569.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Speed up responding to media requests.
3 changes: 3 additions & 0 deletions synapse/media/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,9 @@ def stopProducing(self) -> None:
"""interfaces.IPushProducer"""

# Unregister the consumer so we don't try and interact with it again.
if self.consumer:
self.consumer.unregisterProducer()

self.consumer = None

# Terminate the loop.
Expand Down

0 comments on commit 1892ba5

Please sign in to comment.