summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2020-01-09 17:05:54 +0100
committerGitHub <noreply@github.com>2020-01-09 17:05:54 +0100
commit0f3c353dd3e274f5a7d21c8c2490252c2e5fa7ad (patch)
tree31a486d167103834fde1071b8dc3ec130c525f8d
parentf616ecf361d673e750c940cc67d19a1e21b1db20 (diff)
parent0992ada2fe1cbc8f5f25c0cdec67cb69bb8d3810 (diff)
downloadredis-0f3c353dd3e274f5a7d21c8c2490252c2e5fa7ad.tar.gz
Merge pull request #6715 from trevor211/fixPotentialClusterLinkError
Fix petential cluster link error.
-rw-r--r--src/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 54d14d38f..0526de84d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -2098,6 +2098,10 @@ static int updateMaxclients(long long val, long long prev, char **err) {
static char msg[128];
sprintf(msg, "The operating system is not able to handle the specified number of clients, try with %d", server.maxclients);
*err = msg;
+ if (server.maxclients > prev) {
+ server.maxclients = prev;
+ adjustOpenFilesLimit();
+ }
return 0;
}
if ((unsigned int) aeGetSetSize(server.el) <