select.poll, as opposed to select.epoll, uses milliseconds not seconds for
timeout
This commit is contained in:
parent
53262d4f36
commit
c89bd74a48
1 changed files with 2 additions and 1 deletions
|
@ -160,7 +160,8 @@ class Bot(object):
|
|||
timeouts.append(self.next_ping())
|
||||
timeouts.append(self.next_read_timeout())
|
||||
timeouts.append(self.cache.next_expiration())
|
||||
return min([timeout for timeout in timeouts if not timeout == None])
|
||||
min_secs = min([timeout for timeout in timeouts if not timeout == None])
|
||||
return min_secs*1000 # return milliseconds
|
||||
|
||||
def register_read(self, server: IRCServer.Server):
|
||||
self.poll.modify(server.fileno(), select.POLLIN)
|
||||
|
|
Loading…
Reference in a new issue