Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: fix EMFILE busy loop

Don't spin in epoll_wait() / kevent() / port_getn() / etc. when we can't
accept() a new connection due to having reached the file descriptor limit.
Pass the error to the connection_cb and let the libuv user deal with it.
  • Loading branch information
bnoordhuis committed Sep 10, 2012
1 parent 33bcb63 commit 12c25e1027e26ffb16f54d17a69a88450e9a23df
Showing with 0 additions and 3 deletions.
  1. +0 −3 src/unix/stream.c
@@ -186,9 +186,6 @@ void uv__server_io(uv_loop_t* loop, uv__io_t* w, int events) {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
/* No problem. */
return;
} else if (errno == EMFILE) {
/* TODO special trick. unlock reserved socket, accept, close. */
return;
} else if (errno == ECONNABORTED) {
/* ignore */
continue;

0 comments on commit 12c25e1

Please sign in to comment.
You can’t perform that action at this time.