Merge pull request #6308 from oranagra/repl-diskless-load-config

fix error handling on config parsing of repl-diskless-load
This commit is contained in:
Salvatore Sanfilippo 2019-10-04 11:56:08 +02:00 committed by GitHub
commit c326f28833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -438,6 +438,7 @@ void loadServerConfigFromString(char *config) {
server.repl_diskless_load = configEnumGetValue(repl_diskless_load_enum,argv[1]);
if (server.repl_diskless_load == INT_MIN) {
err = "argument must be 'disabled', 'on-empty-db', 'swapdb' or 'flushdb'";
goto loaderr;
}
} else if (!strcasecmp(argv[0],"repl-diskless-sync-delay") && argc==2) {
server.repl_diskless_sync_delay = atoi(argv[1]);