Merge pull request #6 from jesopo/master

Pull fixes
This commit is contained in:
dongfix 2018-08-30 17:26:44 +01:00 committed by GitHub
commit da5e1bbcac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,11 +91,15 @@ class Bot(object):
timeouts = [] timeouts = []
for server in self.servers.values(): for server in self.servers.values():
timeouts.append(server.until_next_ping()) timeouts.append(server.until_next_ping())
if not timeouts:
return None
return min(timeouts) return min(timeouts)
def next_read_timeout(self): def next_read_timeout(self):
timeouts = [] timeouts = []
for server in self.servers.values(): for server in self.servers.values():
timeouts.append(server.until_read_timeout()) timeouts.append(server.until_read_timeout())
if not timeouts:
return None
return min(timeouts) return min(timeouts)
def get_poll_timeout(self): def get_poll_timeout(self):