Skip to content

Commit

Permalink
request: fix error handling in Request
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Jul 23, 2024
1 parent dc9416f commit 2ddda72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (c *RequestClient) Request(request RawRequest) (response RawResponse, err e
// Connect to the request socket
conn, err := net.DialUnix("unix", nil, c.conn)
defer func() {
if e := conn.Close(); e == nil {
if e := conn.Close(); e != nil {
err = fmt.Errorf("error while closing socket: %w", e)
}
}()
Expand Down

0 comments on commit 2ddda72

Please sign in to comment.