mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Enable again auto reconnect, own solution not working
This commit is contained in:
parent
5582eefae6
commit
939e942ba8
@ -56,7 +56,7 @@ bool ConnectionManager::setConnectionsFromConfig(const Poco::Util::LayeredConfig
|
||||
dbConfig << "db=" << dbName << ";";
|
||||
dbConfig << "user=" << config.getString(firstKeyPart + ".db.user", "root") << ";";
|
||||
dbConfig << "password=" << config.getString(firstKeyPart + ".db.password", "") << ";";
|
||||
dbConfig << "auto-reconnect=false";
|
||||
dbConfig << "auto-reconnect=true";
|
||||
|
||||
setConnection(dbConfig.str(), type);
|
||||
|
||||
@ -73,7 +73,7 @@ Poco::Data::Session ConnectionManager::getConnection(ConnectionType type)
|
||||
throw Poco::NotFoundException("Connection Type unknown", std::to_string(type));
|
||||
}
|
||||
auto session = mSessionPools.getPool(mSessionPoolNames[type]).get();
|
||||
if (!session.isConnected()) {
|
||||
/*if (!session.isConnected()) {
|
||||
printf("reconnect called\n");
|
||||
try {
|
||||
session.reconnect();
|
||||
@ -83,7 +83,7 @@ Poco::Data::Session ConnectionManager::getConnection(ConnectionType type)
|
||||
sendErrorsAsEmail();
|
||||
return mSessionPools.getPool(mSessionPoolNames[type]).get();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//std::string dateTimeString = Poco::DateTimeFormatter::format(Poco::DateTime(), "%d.%m.%y %H:%M:%S");
|
||||
//printf("[getConnection] %s impl: %p\n", dateTimeString.data(), session.impl());
|
||||
return session;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user