Skip to content
Snippets Groups Projects
Commit de55ba21 authored by Erik Johnston's avatar Erik Johnston
Browse files

Fix race in presence handler where we evicted things from cache while handling a key therein

parent 71fb748d
No related branches found
No related tags found
No related merge requests found
......@@ -796,11 +796,12 @@ class PresenceEventSource(object):
updates = []
# TODO(paul): use a DeferredList ? How to limit concurrency.
for observed_user in cachemap.keys():
if not (from_key < cachemap[observed_user].serial):
cached = cachemap[observed_user]
if not (from_key < cached.serial):
continue
if (yield self.is_visible(observer_user, observed_user)):
updates.append((observed_user, cachemap[observed_user]))
updates.append((observed_user, cached))
# TODO(paul): limit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment