From e343115d42363d625a8424d854065a547fe86f5c Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Fri, 2 Jun 2023 21:06:51 +0300 Subject: [PATCH] sumdb: add missing return after http.Error Change-Id: Ic0a9149713f7981e44629b2d96cf2a6ec52d6976 Reviewed-on: https://go-review.googlesource.com/c/mod/+/500455 Reviewed-by: Bryan Mills Auto-Submit: Bryan Mills TryBot-Result: Gopher Robot Run-TryBot: Bryan Mills Reviewed-by: Michael Knyszek --- sumdb/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sumdb/server.go b/sumdb/server.go index 2e523a5..899bd46 100644 --- a/sumdb/server.go +++ b/sumdb/server.go @@ -148,6 +148,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { msg, err := tlog.FormatRecord(start+int64(i), text) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) + return } data = append(data, msg...) }