diff options
| author | 2018-09-11 18:25:27 +0100 | |
|---|---|---|
| committer | 2018-09-11 18:25:27 +0100 | |
| commit | 58bc741177796a3a8411286feddfb64287cd8ebd (patch) | |
| tree | 5f8cb2c092eb328e7ddb95cc9b8bce113e3fb148 /IRCBot.py | |
| parent | Fix weird double indentation in IRCBot.py (diff) | |
| signature | ||
Don't return 0 as "time until next ping" when we've already sent a ping. return
None instead.
Diffstat (limited to 'IRCBot.py')
| -rw-r--r-- | IRCBot.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) |
