mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
anet: avoid double close
This commit is contained in:
parent
3c2a952912
commit
11baa8487c
@ -484,7 +484,7 @@ static int _anetTcpServer(char *err, int port, char *bindaddr, int af, int backl
|
|||||||
|
|
||||||
if (af == AF_INET6 && anetV6Only(err,s) == ANET_ERR) goto error;
|
if (af == AF_INET6 && anetV6Only(err,s) == ANET_ERR) goto error;
|
||||||
if (anetSetReuseAddr(err,s) == ANET_ERR) goto error;
|
if (anetSetReuseAddr(err,s) == ANET_ERR) goto error;
|
||||||
if (anetListen(err,s,p->ai_addr,p->ai_addrlen,backlog) == ANET_ERR) goto error;
|
if (anetListen(err,s,p->ai_addr,p->ai_addrlen,backlog) == ANET_ERR) return ANET_ERR;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user