X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/a4d1ba9a73e459d68423c4da623f8cf1663c70ba..4e5240af642a44654e8cece67a89f06bd359d614:/anet.c diff --git a/anet.c b/anet.c index d58e85b6..4fe811a1 100644 --- a/anet.c +++ b/anet.c @@ -1,6 +1,6 @@ /* anet.c -- Basic TCP socket stuff made a bit less boring * - * Copyright (c) 2006-2009, Salvatore Sanfilippo + * Copyright (c) 2006-2010, Salvatore Sanfilippo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "fmacros.h" + #include #include #include @@ -235,7 +237,7 @@ int anetTcpServer(char *err, int port, char *bindaddr) close(s); return ANET_ERR; } - if (listen(s, 32) == -1) { + if (listen(s, 511) == -1) { /* the magic 511 constant is from nginx */ anetSetError(err, "listen: %s\n", strerror(errno)); close(s); return ANET_ERR;