From e26df7556a927522889f9fae7fb336d66bd01cb8 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 5 Nov 2018 18:21:43 +0000 Subject: [PATCH] Check that a server's STS policy has a `duration` before doing rescheduling-on-disconnect --- modules/sts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sts.py b/modules/sts.py index 0d76e396..fa361604 100644 --- a/modules/sts.py +++ b/modules/sts.py @@ -68,6 +68,6 @@ class Module(ModuleManager.BaseModule): @utils.hook("server.disconnect") def on_disconnect(self, event): sts_policy = self._get_policy(event["server"]) - if sts_policy: + if sts_policy and sts_policy["duration"]: sts_policy["from"] = time.time() self._set_policy(event["server"], sts_policy)