ae.c initial refactoring for epoll implementation

This commit is contained in:
antirez
2009-11-23 12:00:23 +01:00
parent a96ffc6641
commit 5b2a1c292a
3 changed files with 68 additions and 40 deletions

2
anet.c
View File

@ -237,7 +237,7 @@ int anetTcpServer(char *err, int port, char *bindaddr)
close(s);
return ANET_ERR;
}
if (listen(s, 64) == -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;