diff --git a/src/unix/core.c b/src/unix/core.c index 318eb718..bf429948 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -426,6 +426,11 @@ int uv__accept(int sockfd) { while (1) { #if __linux__ + static int no_accept4; + + if (no_accept4) + goto skip; + peerfd = uv__accept4(sockfd, NULL, NULL, @@ -439,6 +444,9 @@ int uv__accept(int sockfd) { if (errno != ENOSYS) break; + + no_accept4 = 1; +skip: #endif peerfd = accept(sockfd, NULL, NULL);