Skip to content

Commit

Permalink
request: return error in write.Flush call
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 12, 2024
1 parent 133aa8f commit f91f7e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ func (c *RequestClient) RawRequest(request RawRequest) (response RawResponse, er
if err != nil {
return nil, fmt.Errorf("error while writing to socket: %w", err)
}
writer.Flush()
err = writer.Flush()
if err != nil {
return nil, fmt.Errorf("error while flushing to socket: %w", err)
}

// Get the response back
rbuf := bytes.NewBuffer(nil)
Expand Down

0 comments on commit f91f7e5

Please sign in to comment.