Skip to content

Commit 6384477

Browse files
committed
- Attempt to fix mutexes
1 parent 3d4e33e commit 6384477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ESPressio_ThreadSafe.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ namespace ESPressio {
164164
}
165165

166166
~ReadWriteMutex() {
167-
_mutex.unlock();
167+
if (!_mutex.try_lock()) { _mutex.unlock(); }
168168
}
169169
// Methods
170170
T Get() {

0 commit comments

Comments
 (0)