Call _check *after* read epoll call - to make sure timeouts are hit accurately

This commit is contained in:
jesopo 2019-06-07 10:39:31 +01:00
parent f3b6d6df0a
commit b3b4d07e63

View file

@ -280,10 +280,10 @@ class Bot(object):
self._event_queue.put(lambda: None)
break
self.trigger(self._check, False)
events = self._read_poll.poll(self.get_poll_timeout())
self.trigger(self._check, False)
for fd, event in events:
if fd == self._rtrigger_server.fileno():
# throw away data from trigger socket