From efd28adbc392b30d2dc2abe5372dbfab6c2a6a44 Mon Sep 17 00:00:00 2001 From: Seednode Date: Tue, 30 Jan 2024 05:12:26 -0600 Subject: [PATCH] Defer closing quit channel --- cmd/root.go | 2 +- cmd/web.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 33427c8..05a3836 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ import ( const ( AllowedCharacters string = `^[A-z0-9.\-_]+$` - ReleaseVersion string = "6.4.1" + ReleaseVersion string = "6.4.2" ) var ( diff --git a/cmd/web.go b/cmd/web.go index 86fe7e0..aadcca9 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -585,6 +585,7 @@ func ServePage(args []string) error { mux.GET(Prefix+"/version", serveVersion(errorChannel)) quit := make(chan struct{}) + defer close(quit) if Index { mux.GET(Prefix+AdminPrefix+"/index/rebuild", serveIndexRebuild(args, index, formats, encoder, errorChannel)) @@ -648,7 +649,5 @@ func ServePage(args []string) error { return err } - close(quit) - return nil }