summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-04-27 18:29:32 +0100
committerMark Haines <mark.haines@matrix.org>2015-04-27 18:29:32 +0100
commitf8b865264a02e263d9b37ac3d9d8bea2e874ed55 (patch)
treeadc8b964febfad000b5cd1caa19c2a5793a709f8 /synapse/rest
parentAdd config for setting the perspective servers (diff)
parentMerge pull request #132 from matrix-org/observer_and_locks (diff)
downloadsynapse-f8b865264a02e263d9b37ac3d9d8bea2e874ed55.tar.xz
Merge branch 'develop' into key_distribution
Conflicts:
	synapse/crypto/keyring.py
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/media/v1/base_resource.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/base_resource.py b/synapse/rest/media/v1/base_resource.py
index edd4f78024..08c8d75af4 100644
--- a/synapse/rest/media/v1/base_resource.py
+++ b/synapse/rest/media/v1/base_resource.py
@@ -25,6 +25,8 @@ from twisted.internet import defer
 from twisted.web.resource import Resource
 from twisted.protocols.basic import FileSender
 
+from synapse.util.async import create_observer
+
 import os
 
 import logging
@@ -87,7 +89,7 @@ class BaseMediaResource(Resource):
             def callback(media_info):
                 del self.downloads[key]
                 return media_info
-        return download
+        return create_observer(download)
 
     @defer.inlineCallbacks
     def _get_remote_media_impl(self, server_name, media_id):