Skip to content

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Sep 19, 2024
1 parent 74a4181 commit 91173cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ func (r *Client) streamPrediction(ctx context.Context, prediction *Prediction, l
}

resp, err := r.c.Do(req)
if err != nil {
if resp != nil {
if err != nil || resp == nil {
if resp == nil {
err = errors.New("received nil response")
} else {
defer resp.Body.Close()
}
select {
Expand Down

0 comments on commit 91173cb

Please sign in to comment.