mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-05 17:12:37 +00:00
Ensure we registerProducer isn't called twice
This commit is contained in:
parent
17b54389fe
commit
dc519602ac
@ -69,6 +69,9 @@ class BackgroundFileConsumer(object):
|
|||||||
streaming (bool): True if push based producer, False if pull
|
streaming (bool): True if push based producer, False if pull
|
||||||
based.
|
based.
|
||||||
"""
|
"""
|
||||||
|
if self.producer:
|
||||||
|
raise Exception("registerProducer called twice")
|
||||||
|
|
||||||
self.producer = producer
|
self.producer = producer
|
||||||
self.streaming = streaming
|
self.streaming = streaming
|
||||||
self.finished_deferred = threads.deferToThread(self._writer)
|
self.finished_deferred = threads.deferToThread(self._writer)
|
||||||
|
Loading…
Reference in New Issue
Block a user