Skip to content

Commit

Permalink
remove unreachable body closure
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Aug 29, 2024
1 parent 99113bb commit fa03d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/stream_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (instance *StreamInstance) LoadBalancer(previous *[]int, method string) (*h
utils.SafeLogf("[DEBUG] Error fetching stream from %s: %s\n", url, err.Error())
}

if resp.Body != nil {
if resp != nil && resp.Body != nil {
_, _ = io.Copy(io.Discard, resp.Body)
resp.Body.Close()
}
Expand Down

0 comments on commit fa03d9b

Please sign in to comment.