mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix PollPoller
This commit is contained in:
parent
6aa99e4441
commit
eadc526192
@ -423,7 +423,7 @@ if hasattr(select, "poll") or hasattr(select, "epoll"):
|
|||||||
for m, r in self.fds[fd]:
|
for m, r in self.fds[fd]:
|
||||||
if not r:
|
if not r:
|
||||||
continue
|
continue
|
||||||
modes.append(m, r)
|
modes.append((m, r))
|
||||||
|
|
||||||
if not modes:
|
if not modes:
|
||||||
self.poll.unregister(fd)
|
self.poll.unregister(fd)
|
||||||
@ -443,6 +443,11 @@ if hasattr(select, "poll") or hasattr(select, "epoll"):
|
|||||||
return self.events.pop(0)
|
return self.events.pop(0)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def wait(self, nsec=0):
|
||||||
|
events = self._wait(nsec)
|
||||||
|
self.events = []
|
||||||
|
return events
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
for fd in self.fds:
|
for fd in self.fds:
|
||||||
self.poll.unregister(fd)
|
self.poll.unregister(fd)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user