From 4ba02a5940669ee7359f8a1fbd4f65d862fcb3f2 Mon Sep 17 00:00:00 2001 From: Lukas Rist Date: Thu, 28 Sep 2023 22:09:25 +0200 Subject: [PATCH] close file handler --- backend/handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/handlers.go b/backend/handlers.go index 5030890..a3414d0 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -47,6 +47,7 @@ func (cs *server) publishHandler(w http.ResponseWriter, r *http.Request, _ httpr http.Error(w, http.StatusText(http.StatusRequestEntityTooLarge), http.StatusRequestEntityTooLarge) return } + defer body.Close() cs.publish(msg)