Skip to content

Commit

Permalink
fix: should close socket fd when retry connet remote (tcp)
Browse files Browse the repository at this point in the history
  • Loading branch information
WSL committed Jul 7, 2016
1 parent b7205d3 commit 64d1ec8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ static int _redisContextConnectTcp(redisContext *c, const char *addr, int port,
if (++reuses >= REDIS_CONNECT_RETRIES) {
goto error;
} else {
redisContextCloseFd(c);
goto addrretry;
}
} else {
Expand Down

0 comments on commit 64d1ec8

Please sign in to comment.