mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04: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