diff options
author | John Smith <mrdoctorwho@helldev.net> | 2019-03-29 06:17:45 +0300 |
---|---|---|
committer | John Smith <mrdoctorwho@helldev.net> | 2019-03-29 06:17:45 +0300 |
commit | 4aa1afa8a4b81941464a4283d65e7ec7a4fc1380 (patch) | |
tree | ec19be731eed3955de43080183fd3c1416342dc6 | |
parent | 98a1194833b925fdbdf5e3ead9edf9b11504934f (diff) |
Fix user not being removed from USERS_ON_INIT if error happens during their initialization
-rw-r--r-- | modules/mod_prs_main.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mod_prs_main.py b/modules/mod_prs_main.py index 027aef9..4953c0a 100644 --- a/modules/mod_prs_main.py +++ b/modules/mod_prs_main.py @@ -30,13 +30,13 @@ def initializeUser(source, resource, prs): "please register again." " This incident will be reported.\nCause: %s") % returnExc()) logger.error("Failed to authenicate user! Error: %s (jid: %s)", e.message, source) + finally: + if source in USERS_ON_INIT: + USERS_ON_INIT.remove(source) else: user.initialize(send=True, resource=resource) # probably we need to know resource a bit earlier than this time utils.runThread(executeHandlers, ("prs01", (source, prs))) - if source in USERS_ON_INIT: - USERS_ON_INIT.remove(source) - def presence_handler(cl, prs): pType = prs.getType() |