fix bug when conf define SentinelServerPool but without Sentinels instances

This commit is contained in:
fortrue 2017-12-28 21:05:19 +08:00
parent 45661645ed
commit 996e02fd4d

View File

@ -586,7 +586,7 @@ bool Conf::setServers(std::vector<ServerConf>& servs, const char* name, const Co
return false; return false;
} }
if (!p->sub) { if (!p->sub) {
Throw(InvalidValue, "%s:%d %s require scope value", name, p->file, p->line); Throw(InvalidValue, "%s:%d %s require scope value", p->file, p->line, name);
} }
for (auto n = p->sub; n; n = n->next) { for (auto n = p->sub; n; n = n->next) {
if (strcasecmp(n->key.c_str(), "+") == 0) { if (strcasecmp(n->key.c_str(), "+") == 0) {