Skip to content

Commit

Permalink
directly compare against EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Eschenburg committed Nov 23, 2021
1 parent adcb634 commit bfcf6b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notify_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func sdNotifyBarrier(client *net.UnixConn) error {
// Read a single byte expecting EOF.
var buf [1]byte
_, err = pipeR.Read(buf[:])
if errors.Is(err, io.EOF) {
if err == io.EOF { //nolint:errorlint // comparison with io.EOF is legit.
return nil
} else if err != nil {
return err
Expand Down

0 comments on commit bfcf6b9

Please sign in to comment.