db/proxy: make connect errors during startup non-fatal

This commit is contained in:
Max Kellermann
2017-01-23 18:48:04 +01:00
parent f01eb2f95d
commit e78ab767d3
2 changed files with 9 additions and 2 deletions

View File

@@ -346,9 +346,15 @@ ProxyDatabase::Create(EventLoop &loop, DatabaseListener &listener,
void
ProxyDatabase::Open()
{
Connect();
update_stamp = 0;
try {
Connect();
} catch (const std::runtime_error &error) {
/* this error is non-fatal, because this plugin will
attempt to reconnect again automatically */
LogError(error);
}
}
void