diff options
| author | 2019-06-06 23:45:33 +0100 | |
|---|---|---|
| committer | 2019-06-06 23:45:33 +0100 | |
| commit | c89bd74a4807626f238405a90fff19a2bffec0e9 (patch) | |
| tree | 0215b8a41312c858649c68f8cf40dfb6aaef351e /src | |
| parent | Merge pull request #65 from jesopo/feature/poll (diff) | |
| signature | ||
select.poll, as opposed to select.epoll, uses milliseconds not seconds for
timeout
Diffstat (limited to 'src')
| -rw-r--r-- | src/IRCBot.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/IRCBot.py b/src/IRCBot.py index 9c563f71..9d47b33e 100644 --- a/src/IRCBot.py +++ b/src/IRCBot.py @@ -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) |
