From 573f8c44a0f07de74406e85c5a14ee1a9fcbb306 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 7 Oct 2010 15:08:47 -0400 Subject: [PATCH] utils: use system default max for listen() There's apparently a define that gives the right value to pass to listen. So this commit makes us use that instead of our arbitrary "32" --- src/libply/ply-utils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c index 633ff1c8..2685543a 100644 --- a/src/libply/ply-utils.c +++ b/src/libply/ply-utils.c @@ -59,10 +59,6 @@ #define PLY_ERRNO_STACK_SIZE 256 #endif -#ifndef PLY_SOCKET_CONNECTION_BACKLOG -#define PLY_SOCKET_CONNECTION_BACKLOG 32 -#endif - #ifndef PLY_SUPER_SECRET_LAZY_UNMOUNT_FLAG #define PLY_SUPER_SECRET_LAZY_UNMOUNT_FLAG 2 #endif @@ -252,7 +248,7 @@ ply_listen_to_unix_socket (const char *path, free (address); - if (listen (fd, PLY_SOCKET_CONNECTION_BACKLOG) < 0) + if (listen (fd, SOMAXCONN) < 0) { ply_save_errno (); close (fd);