Fix return value check for anetTcpAccept

anetTcpAccept returns ANET_ERR, not AE_ERR.

This isn't a physical error since both ANET_ERR
and AE_ERR are -1, but better to be consistent.
This commit is contained in:
Matt Stancliff 2014-02-26 17:58:46 -05:00 committed by antirez
parent 9b401819c0
commit 59cf0b1902
2 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
REDIS_NOTUSED(privdata);
cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
if (cfd == AE_ERR) {
if (cfd == ANET_ERR) {
redisLog(REDIS_VERBOSE,"Accepting cluster node: %s", server.neterr);
return;
}

View File

@ -587,7 +587,7 @@ void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
REDIS_NOTUSED(privdata);
cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
if (cfd == AE_ERR) {
if (cfd == ANET_ERR) {
redisLog(REDIS_WARNING,"Accepting client connection: %s", server.neterr);
return;
}