diff options
| author | 2019-06-24 17:22:08 +0100 | |
|---|---|---|
| committer | 2019-06-24 17:22:08 +0100 | |
| commit | a1cc2e778cad5f0b561007dcfc7adb69497cc7b4 (patch) | |
| tree | 17f969af1260767574e71da2e8989f4ec726da2a | |
| parent | gitea.GitHub -> gitea.Gitea (diff) | |
| signature | ||
Return 0 seconds if timeout seconds is negative
| -rw-r--r-- | src/IRCBot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/IRCBot.py b/src/IRCBot.py index d3948a58..096a2156 100644 --- a/src/IRCBot.py +++ b/src/IRCBot.py @@ -207,7 +207,7 @@ class Bot(object): timeouts.append(self.next_read_timeout()) timeouts.append(self.cache.next_expiration()) min_secs = min([timeout for timeout in timeouts if not timeout == None]) - return min_secs + return max([min_secs, 0]) def disconnect(self, server: IRCServer.Server): del self.servers[server.fileno()] |
