Sentinel doesn't need a license key

Former-commit-id: bc2d8c18255214b873bf45d8db8af3727ebc4723
This commit is contained in:
John Sully 2020-07-11 22:13:07 +00:00
parent 06a8e2aa2a
commit 074cb1edc1

View File

@ -1126,6 +1126,8 @@ void serverLog(int level, const char *fmt, ...) {
static void checkTrialTimeout() static void checkTrialTimeout()
{ {
#ifndef NO_LICENSE_CHECK #ifndef NO_LICENSE_CHECK
if (g_pserver->sentinel_mode)
return; // sentinel is not licensed
if (cserver.license_key != nullptr && FValidKey(cserver.license_key, strlen(cserver.license_key))) if (cserver.license_key != nullptr && FValidKey(cserver.license_key, strlen(cserver.license_key)))
return; return;
time_t curtime = time(NULL); time_t curtime = time(NULL);
@ -5251,7 +5253,7 @@ void redisAsciiArt(void) {
serverLogRaw(LL_NOTICE|LL_RAW,buf); serverLogRaw(LL_NOTICE|LL_RAW,buf);
} }
if (cserver.license_key == nullptr) if (cserver.license_key == nullptr && !g_pserver->sentinel_mode)
{ {
#ifndef NO_LICENSE_CHECK #ifndef NO_LICENSE_CHECK
serverLog(LL_WARNING, "!!!! KeyDB Pro is being run in trial mode !!!!"); serverLog(LL_WARNING, "!!!! KeyDB Pro is being run in trial mode !!!!");