Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Also do check inside linearizer
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Mar 27, 2018
1 parent 44cd6e1 commit 3e0c066
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions synapse/handlers/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,10 @@ def check_user_id_not_appservice_exclusive(self, user_id, allowed_appservice=Non
def _generate_user_id(self, reseed=False):
if reseed or self._next_generated_user_id is None:
with (yield self._generate_user_id_linearizer.queue(())):
self._next_generated_user_id = (
yield self.store.find_next_generated_user_id_localpart()
)
if reseed or self._next_generated_user_id is None:
self._next_generated_user_id = (
yield self.store.find_next_generated_user_id_localpart()
)

id = self._next_generated_user_id
self._next_generated_user_id += 1
Expand Down

0 comments on commit 3e0c066

Please sign in to comment.