Skip to content

Commit

Permalink
disruption backend: set proto from request if no response returned
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Nov 13, 2024
1 parent a9f2023 commit d047c53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/disruption/backend/reqresp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<none>"
}

Expand Down Expand Up @@ -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
}

0 comments on commit d047c53

Please sign in to comment.