1 Commits

Author SHA1 Message Date
9e802c4fec Update version to v3.1.1 (Fix concurrent writes crash) 2026-02-06 22:21:30 +05:30
3 changed files with 13 additions and 2 deletions

View File

@@ -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 # v3.1.0
## What's Changed ## What's Changed

View File

@@ -1 +1 @@
3.1.0 3.1.1

View File

@@ -54,7 +54,6 @@ func (c *Cache) Get(key string) (string, bool) {
} }
if time.Since(item.Timestamp) > c.ttl { if time.Since(item.Timestamp) > c.ttl {
delete(c.items, key)
return "", false return "", false
} }
@@ -430,6 +429,11 @@ func main() {
mux.HandleFunc("GET /custom/{filename}", handleCustomIcon) 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}/{colorcode}", handleIcon)
mux.HandleFunc("GET /{iconname}", handleIcon) mux.HandleFunc("GET /{iconname}", handleIcon)