aboutsummaryrefslogtreecommitdiff
path: root/IRCServer.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-11 18:25:27 +0100
committerGravatar jesopo2018-09-11 18:25:27 +0100
commit58bc741177796a3a8411286feddfb64287cd8ebd (patch)
tree5f8cb2c092eb328e7ddb95cc9b8bce113e3fb148 /IRCServer.py
parentFix 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 'IRCServer.py')
-rw-r--r--IRCServer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/IRCServer.py b/IRCServer.py
index 1c622e94..906ba572 100644
--- a/IRCServer.py
+++ b/IRCServer.py
@@ -228,6 +228,8 @@ class Server(object):
return decoded_lines
def until_next_ping(self):
+ if self.ping_sent:
+ return None
return max(0, (self.last_read+PING_INTERVAL_SECONDS
)-time.monotonic())
def ping_due(self):