diff --git a/main.go b/main.go index ccbcfe7..92e298c 100644 --- a/main.go +++ b/main.go @@ -166,7 +166,7 @@ func handleStatus(w http.ResponseWriter, _ *http.Request) { statusMutex.RLock() defer statusMutex.RUnlock() - _, blockers := getBlockers() + _, blockers := getBlockersNoLock() response := StatusResponse{ Usage: currentStatus, @@ -194,7 +194,10 @@ func handleReset(w http.ResponseWriter, _ *http.Request) { func getBlockers() (bool, []string) { statusMutex.Lock() defer statusMutex.Unlock() + return getBlockersNoLock() +} +func getBlockersNoLock() (bool, []string) { blocked := true blockers := []string{}