diff options
author | Erik Johnston <erik@matrix.org> | 2018-03-27 13:01:34 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-03-27 13:01:34 +0100 |
commit | 3e0c0660b31827f9d13c1fb5153a77e70813d5d3 (patch) | |
tree | 5f05f922790d74cec1690b82622ae19d4ded80d2 | |
parent | PEP8 (diff) | |
download | synapse-3e0c0660b31827f9d13c1fb5153a77e70813d5d3.tar.xz |
Also do check inside linearizer
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/register.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index f1bf81ed7d..dd03705279 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -350,9 +350,10 @@ class RegistrationHandler(BaseHandler): 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 |