kopia lustrzana https://github.com/micropython/micropython-lib
select: epoll.register(): Handle case of fd have been already registered.
Is this correct enough? Certainly, Python's epoll should not be fire-once?asyncio-segfault
rodzic
1cc01656f7
commit
52ac4308f7
|
@ -37,6 +37,8 @@ class Epoll:
|
||||||
retval = fd
|
retval = fd
|
||||||
s = struct.pack(self.epoll_event, eventmask, retval)
|
s = struct.pack(self.epoll_event, eventmask, retval)
|
||||||
r = epoll_ctl(self.epfd, EPOLL_CTL_ADD, fd, s)
|
r = epoll_ctl(self.epfd, EPOLL_CTL_ADD, fd, s)
|
||||||
|
if r == -1 and os.errno.get() == 17:
|
||||||
|
r = epoll_ctl(self.epfd, EPOLL_CTL_MOD, fd, s)
|
||||||
os.check_error(r)
|
os.check_error(r)
|
||||||
|
|
||||||
def poll(self, timeout=-1):
|
def poll(self, timeout=-1):
|
||||||
|
|
Ładowanie…
Reference in New Issue