From 7077a6db9b92c170c432a8e3a39771a0b2beed84 Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Wed, 28 Sep 2022 09:15:52 +0200 Subject: [PATCH] getPayload: log info if request was cancelled (#356) --- server/service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/service.go b/server/service.go index fc6331dd..c07d4bbc 100644 --- a/server/service.go +++ b/server/service.go @@ -489,7 +489,11 @@ func (m *BoostService) handleGetPayload(w http.ResponseWriter, req *http.Request responsePayload := new(types.GetPayloadResponse) _, err := SendHTTPRequest(requestCtx, m.httpClientGetPayload, http.MethodPost, url, ua, payload, responsePayload) if err != nil { - log.WithError(err).Error("error making request to relay") + if errors.Is(requestCtx.Err(), context.Canceled) { + log.Info("request was cancelled") // this is expected, if payload has already been received by another relay + } else { + log.WithError(err).Error("error making request to relay") + } return }