Skip to content

Commit

Permalink
getPayload: log info if request was cancelled (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris authored Sep 28, 2022
1 parent 025acf0 commit 7077a6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 7077a6d

Please sign in to comment.