Fix a bug in the system without database

This commit is contained in:
an-tao 2018-11-12 15:30:44 +08:00
parent d3931c73fd
commit a45bc0c0a7
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,7 @@ static void loadApp(const Json::Value &app)
}
static void loadDbClients(const Json::Value &dbClients)
{
#if USE_POSTGRESQL
if (!dbClients)
return;
for (auto &client : dbClients)
@ -237,6 +238,7 @@ static void loadDbClients(const Json::Value &dbClients)
auto name = client.get("name", "default").asString();
HttpAppFramework::instance().createDbClient(type, host, (u_short)port, dbname, user, password, connNum, name);
}
#endif
}
static void loadListeners(const Json::Value &listeners)
{