From 9e802c4fece9916c872d21de0dffc7772d9000dd Mon Sep 17 00:00:00 2001 From: ryuupendragon Date: Fri, 6 Feb 2026 22:21:30 +0530 Subject: [PATCH] Update version to v3.1.1 (Fix concurrent writes crash) --- CHANGELOG.md | 7 +++++++ build/VERSION | 2 +- build/main.go | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 651245e..1b384dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v3.1.1 + +## What's Changed + +* Fixed crash caused by concurrent writes under high load ([#684](https://github.com/selfhst/icons/issues/684)) +* Suppress favicon error log message when viewing icons directly from a browser + # v3.1.0 ## What's Changed diff --git a/build/VERSION b/build/VERSION index a0cd9f0..50e47c8 100644 --- a/build/VERSION +++ b/build/VERSION @@ -1 +1 @@ -3.1.0 \ No newline at end of file +3.1.1 \ No newline at end of file diff --git a/build/main.go b/build/main.go index 5619c05..d516926 100644 --- a/build/main.go +++ b/build/main.go @@ -54,7 +54,6 @@ func (c *Cache) Get(key string) (string, bool) { } if time.Since(item.Timestamp) > c.ttl { - delete(c.items, key) return "", false } @@ -430,6 +429,11 @@ func main() { mux.HandleFunc("GET /custom/{filename}", handleCustomIcon) + // Suppress favicon load error message in logs when viewing via browser + mux.HandleFunc("GET /favicon.ico", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusNoContent) + }) + mux.HandleFunc("GET /{iconname}/{colorcode}", handleIcon) mux.HandleFunc("GET /{iconname}", handleIcon)