summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-02-18 08:44:19 -0500
committerGitHub <noreply@github.com>2021-02-18 08:44:19 -0500
commit43f1c82457e4ce2ef9805829d86dc8791b56bbd5 (patch)
treea987fddf4b8891ff3de72db56a8af86284e896db /synapse/handlers
parentRevert "Update workers.md" (diff)
downloadsynapse-43f1c82457e4ce2ef9805829d86dc8791b56bbd5.tar.xz
Add back the guard against the user directory stream position not existing. (#9428)
As the comment says, this guard was there for when the
initial user directory update has yet to happen.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/user_directory.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py
index 3dfb0a26c2..1a8340000a 100644
--- a/synapse/handlers/user_directory.py
+++ b/synapse/handlers/user_directory.py
@@ -143,6 +143,10 @@ class UserDirectoryHandler(StateDeltasHandler):
         if self.pos is None:
             self.pos = await self.store.get_user_directory_stream_pos()
 
+        # If still None then the initial background update hasn't happened yet.
+        if self.pos is None:
+            return None
+
         # Loop round handling deltas until we're up to date
         while True:
             with Measure(self.clock, "user_dir_delta"):