Check that a server's STS policy has a duration before doing

rescheduling-on-disconnect
This commit is contained in:
jesopo 2018-11-05 18:21:43 +00:00
parent d92fc7f6b8
commit e26df7556a

View file

@ -68,6 +68,6 @@ class Module(ModuleManager.BaseModule):
@utils.hook("server.disconnect") @utils.hook("server.disconnect")
def on_disconnect(self, event): def on_disconnect(self, event):
sts_policy = self._get_policy(event["server"]) sts_policy = self._get_policy(event["server"])
if sts_policy: if sts_policy and sts_policy["duration"]:
sts_policy["from"] = time.time() sts_policy["from"] = time.time()
self._set_policy(event["server"], sts_policy) self._set_policy(event["server"], sts_policy)