ev: fix epoll_init file descriptor leak
Fix the edge case where epoll_init() leaks a file descriptor when it is called when the process has no open file descriptors.
This commit is contained in:
parent
70381cef9b
commit
bd82d02467
@ -225,7 +225,7 @@ epoll_init (EV_P_ int flags)
|
||||
#ifdef EPOLL_CLOEXEC
|
||||
backend_fd = epoll_create1 (EPOLL_CLOEXEC);
|
||||
|
||||
if (backend_fd <= 0)
|
||||
if (backend_fd < 0)
|
||||
#endif
|
||||
backend_fd = epoll_create (256);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user