avoid memory leak
Although fd is always the smallest number which haven't been allocated, which means memory leak is quite small. but the worst situation may consume lots of memory.
This commit is contained in:
parent
1af7f84f41
commit
dfd4cdd758
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ class EventLoop(object):
|
|||
|
||||
def remove(self, f):
|
||||
fd = f.fileno()
|
||||
self._fd_to_f[fd] = None
|
||||
del self._fd_to_f[fd]
|
||||
self._impl.remove_fd(fd)
|
||||
|
||||
def modify(self, f, mode):
|
||||
|
|
Loading…
Reference in a new issue