diff --git a/pkg/disruption/backend/reqresp.go b/pkg/disruption/backend/reqresp.go index 80a5f9f9cec1..8b773ba0273b 100644 --- a/pkg/disruption/backend/reqresp.go +++ b/pkg/disruption/backend/reqresp.go @@ -74,6 +74,9 @@ func (rr RequestResponse) Protocol() string { if rr.Response != nil { return rr.Response.Proto } + if rr.Request != nil { + return rr.Request.Proto + } return "" } @@ -114,5 +117,5 @@ func IsRetryAfter(resp *http.Response) (string, bool) { } func (rr RequestResponse) ShutdownInProgress() bool { - return rr.ShutdownResponse != nil && rr.ShutdownResponse.ShutdownInProgress == true + return rr.ShutdownResponse != nil && rr.ShutdownResponse.ShutdownInProgress }