mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-18 07:52:56 +01:00
Fix bug where we used an unbound local variable if we ended up rolling back the persist_event transaction
This commit is contained in:
parent
1ef51e7939
commit
a75f8686ba
1 changed files with 1 additions and 4 deletions
|
@ -77,7 +77,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
stream_ordering = self.min_token
|
stream_ordering = self.min_token
|
||||||
|
|
||||||
try:
|
try:
|
||||||
latest = yield self._db_pool.runInteraction(
|
yield self._db_pool.runInteraction(
|
||||||
self._persist_pdu_event_txn,
|
self._persist_pdu_event_txn,
|
||||||
pdu=pdu,
|
pdu=pdu,
|
||||||
event=event,
|
event=event,
|
||||||
|
@ -86,7 +86,6 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
)
|
)
|
||||||
except _RollbackButIsFineException as e:
|
except _RollbackButIsFineException as e:
|
||||||
pass
|
pass
|
||||||
defer.returnValue(latest)
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_event(self, event_id, allow_none=False):
|
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
|
@defer.inlineCallbacks
|
||||||
def get_current_state(self, room_id, event_type=None, state_key=""):
|
def get_current_state(self, room_id, event_type=None, state_key=""):
|
||||||
sql = (
|
sql = (
|
||||||
|
|
Loading…
Reference in a new issue