From 35d5ed8d8e8e7bf6c69b0dbaebff4be46d408abe Mon Sep 17 00:00:00 2001 From: gohumble <55599638+gohumble@users.noreply.github.com> Date: Sun, 26 Dec 2021 15:12:18 +0100 Subject: [PATCH] fix nLocks (#241) --- internal/runtime/mutex/mutex.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/runtime/mutex/mutex.go b/internal/runtime/mutex/mutex.go index b92bede..2757d64 100644 --- a/internal/runtime/mutex/mutex.go +++ b/internal/runtime/mutex/mutex.go @@ -79,8 +79,9 @@ func UnlockWithContext(ctx context.Context, s string) { } else { log.Tracef("[Mutex] Skip unlock (nLocks: %d)", nLocks) } + mutexMap.Remove(fmt.Sprintf("nLocks:%s", uid)) Unlock(fmt.Sprintf("mutex-sync:%s:%s", s, uid)) - mutexMap.Remove(fmt.Sprintf("mutex-sync:%s:%s", s, uid)) + //mutexMap.Remove(fmt.Sprintf("mutex-sync:%s:%s", s, uid)) } // Lock locks a mutex in the mutexMap. If the mutex is already in the map, it locks the current call.