From 58bc741177796a3a8411286feddfb64287cd8ebd Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 11 Sep 2018 18:25:27 +0100 Subject: Don't return 0 as "time until next ping" when we've already sent a ping. return None instead. --- IRCBot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'IRCBot.py') diff --git a/IRCBot.py b/IRCBot.py index 0cf36fd3..77ee00e3 100644 --- a/IRCBot.py +++ b/IRCBot.py @@ -95,7 +95,9 @@ class Bot(object): def next_ping(self): timeouts = [] for server in self.servers.values(): - timeouts.append(server.until_next_ping()) + timeout = server.until_next_ping() + if not timeout == None: + timeouts.append(timeout) if not timeouts: return None return min(timeouts) -- cgit v1.3.1-10-gc9f91