Skip to content

Commit 035d73b

Browse files
committed
- Attempt to fix mutexes
1 parent a5af4ec commit 035d73b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ESPressio_ThreadSafe.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ namespace ESPressio {
5555
}
5656

5757
~Mutex() {
58-
_mutex.unlock();
58+
// Check if the mutex is locked....
59+
if (!_mutex.try_lock()) { _mutex.unlock() };
5960
}
6061
// Methods
6162
T Get() {

0 commit comments

Comments
 (0)