From eda312f9b1998f5c6d6881312091fd9451c2ffe3 Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Tue, 31 May 2022 21:25:23 -0400 Subject: fix(778): remove extra mutex lock when resolving bug prefix --- cache/repo_cache_bug.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'cache/repo_cache_bug.go') diff --git a/cache/repo_cache_bug.go b/cache/repo_cache_bug.go index bce01926..f8bf5a2f 100644 --- a/cache/repo_cache_bug.go +++ b/cache/repo_cache_bug.go @@ -499,14 +499,10 @@ func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title strin // RemoveBug removes a bug from the cache and repo given a bug id prefix func (c *RepoCache) RemoveBug(prefix string) error { - c.muBug.RLock() - b, err := c.ResolveBugPrefix(prefix) if err != nil { - c.muBug.RUnlock() return err } - c.muBug.RUnlock() c.muBug.Lock() err = bug.RemoveBug(c.repo, b.Id()) -- cgit