From 951d711054d71406bd360d180b063e89a0e11b89 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Mon, 15 Dec 2025 08:20:45 -0800 Subject: [PATCH] client/systray: add missing deferred unlock for httpCache mutex Updates #cleanup Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris --- client/systray/systray.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/systray/systray.go b/client/systray/systray.go index bc099a1ec..330df8d06 100644 --- a/client/systray/systray.go +++ b/client/systray/systray.go @@ -372,6 +372,7 @@ func setRemoteIcon(menu *systray.MenuItem, urlStr string) { } cacheMu.Lock() + defer cacheMu.Unlock() b, ok := httpCache[urlStr] if !ok { resp, err := http.Get(urlStr) @@ -395,7 +396,6 @@ func setRemoteIcon(menu *systray.MenuItem, urlStr string) { resp.Body.Close() } } - cacheMu.Unlock() if len(b) > 0 { menu.SetIcon(b)