summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/sendtodevice.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/rest/client/v2_alpha/sendtodevice.py b/synapse/rest/client/v2_alpha/sendtodevice.py
index 2ce038c6cd..2187350d42 100644
--- a/synapse/rest/client/v2_alpha/sendtodevice.py
+++ b/synapse/rest/client/v2_alpha/sendtodevice.py
@@ -43,13 +43,10 @@ class SendToDeviceRestServlet(servlet.RestServlet):
         self.txns = HttpTransactionCache()
         self.device_message_handler = hs.get_device_message_handler()
 
-    @defer.inlineCallbacks
     def on_PUT(self, request, message_type, txn_id):
-        observable = self.txns.fetch_or_execute_request(
+        return self.txns.fetch_or_execute_request(
             request, self._put, request, message_type, txn_id
         )
-        res = yield observable.observe()
-        defer.returnValue(res)
 
     @defer.inlineCallbacks
     def _put(self, request, message_type, txn_id):