mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add mutex for connection manager, maybe there is where the mysql error are coming from, if two threads call getConnection at the same time
This commit is contained in:
parent
92de466261
commit
81faa98f21
@ -36,6 +36,8 @@ public:
|
||||
}
|
||||
|
||||
inline Poco::Data::Session getConnection(ConnectionType type) {
|
||||
Poco::ScopedLock<Poco::FastMutex> _lock(mWorkingMutex);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case CONNECTION_MYSQL_LOGIN_SERVER:
|
||||
@ -55,6 +57,7 @@ protected:
|
||||
private:
|
||||
std::string mSessionPoolNames[CONNECTION_MAX];
|
||||
Poco::Data::SessionPoolContainer mSessionPools;
|
||||
Poco::FastMutex mWorkingMutex;
|
||||
};
|
||||
|
||||
#endif //GRADIDO_LOGIN_SERVER_SINGLETON_MANAGER_CONNECTION_MANAGER_INCLUDE
|
||||
Loading…
x
Reference in New Issue
Block a user