summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-09 16:27:59 +0100
committerErik Johnston <erik@matrix.org>2014-09-09 16:27:59 +0100
commita75f8686ba4c536db1a9e341786ac34bab3d25c7 (patch)
tree7769c72b7e8d300404517acdcb0bcffef0b7287d
parentImproved room page loading flow: do pagination only when the members list is ... (diff)
downloadsynapse-a75f8686ba4c536db1a9e341786ac34bab3d25c7.tar.xz
Fix bug where we used an unbound local variable if we ended up rolling back the persist_event transaction
-rw-r--r--synapse/storage/__init__.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index a2eec3b209..ad2a484c16 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -77,7 +77,7 @@ class DataStore(RoomMemberStore, RoomStore,
             stream_ordering = self.min_token
 
         try:
-            latest = yield self._db_pool.runInteraction(
+            yield self._db_pool.runInteraction(
                 self._persist_pdu_event_txn,
                 pdu=pdu,
                 event=event,
@@ -86,7 +86,6 @@ class DataStore(RoomMemberStore, RoomStore,
             )
         except _RollbackButIsFineException as e:
             pass
-        defer.returnValue(latest)
 
     @defer.inlineCallbacks
     def get_event(self, event_id, allow_none=False):
@@ -214,8 +213,6 @@ class DataStore(RoomMemberStore, RoomStore,
                 }
             )
 
-        return self._get_room_events_max_id_txn(txn)
-
     @defer.inlineCallbacks
     def get_current_state(self, room_id, event_type=None, state_key=""):
         sql = (