From 7785a0b5a65efbe276ea27f68960373e55861709 Mon Sep 17 00:00:00 2001 From: einhorn_b Date: Wed, 16 Jun 2021 11:07:30 +0200 Subject: [PATCH] delete information only after successfull unlock --- login_server/src/cpp/lib/MultithreadContainer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/login_server/src/cpp/lib/MultithreadContainer.h b/login_server/src/cpp/lib/MultithreadContainer.h index dafc4f9ad..2596fb2fd 100644 --- a/login_server/src/cpp/lib/MultithreadContainer.h +++ b/login_server/src/cpp/lib/MultithreadContainer.h @@ -21,7 +21,7 @@ ***************************************************************************/ /*! - + \brief Container Wrapper class for mutex protected container changed to poco mutex for gradido login server default mutex from poco is recursive so it is some heavy thing @@ -47,7 +47,7 @@ namespace UniLib { // \return false if mutex was locked from another thread bool tryLock(); - inline void unlock() { mLastSucceededLock = ""; mWorkMutex.unlock(); } + inline void unlock() { mWorkMutex.unlock(); mLastSucceededLock = ""; } inline const std::string& getLastSucceededLock() { return mLastSucceededLock; } protected: @@ -58,4 +58,4 @@ namespace UniLib { } } -#endif //__DR_UNIVERSUM_LIB_LIB_MULTITHREAD_CONTAINER_H__ \ No newline at end of file +#endif //__DR_UNIVERSUM_LIB_LIB_MULTITHREAD_CONTAINER_H__