diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-14 15:41:55 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-14 15:41:55 +0100 |
commit | ef3d8754f51e38375dc8d5144d2224d5e86ce458 (patch) | |
tree | eac9cbabaa0352ded32a2454bedaab26829ab6f2 | |
parent | Count and loop (diff) | |
download | synapse-ef3d8754f51e38375dc8d5144d2224d5e86ce458.tar.xz |
Call from right thread
-rw-r--r-- | synapse/storage/events.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index a6b2e7677f..59af21a2ca 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -513,6 +513,7 @@ class EventsStore(SQLBaseStore): self._event_fetch_list = [] if not event_list: + self._event_fetch_ongoing -= 1 return event_id_lists = zip(*event_list)[0] @@ -527,7 +528,8 @@ class EventsStore(SQLBaseStore): } for ids, d in event_list: - d.callback( + reactor.callFromThread( + d.callback, [ row_dict[i] for i in ids if i in row_dict |