diff --git a/cmd/relay/forward.go b/cmd/relay/forward.go index f917826e..d13eb946 100644 --- a/cmd/relay/forward.go +++ b/cmd/relay/forward.go @@ -76,6 +76,7 @@ func (s *Service) ForwardSiblingRequest(c echo.Context, body []byte) { } if !(upstreamResp.StatusCode >= 200 && upstreamResp.StatusCode < 300) { respBytes, _ := io.ReadAll(upstreamResp.Body) + upstreamResp.Body.Close() s.logger.Warn("forwarded admin HTTP request failed", "method", req.Method, "sibling", hostname, "url", u.String(), "statusCode", upstreamResp.StatusCode, "body", string(respBytes)) continue } diff --git a/cmd/relay/handlers_admin.go b/cmd/relay/handlers_admin.go index 45c06bc0..3190ee69 100644 --- a/cmd/relay/handlers_admin.go +++ b/cmd/relay/handlers_admin.go @@ -18,7 +18,7 @@ import ( dto "github.com/prometheus/client_model/go" ) -// This endpint is basically the same as the regular com.atproto.sync.requestCrawl endpoint, except it sets a flag to bypass configuration checks. +// This endpoint is basically the same as the regular com.atproto.sync.requestCrawl endpoint, except it sets a flag to bypass configuration checks. func (s *Service) handleAdminRequestCrawl(c echo.Context) error { var body comatproto.SyncRequestCrawl_Input if err := c.Bind(&body); err != nil {