Skip to content

Commit

Permalink
Merge pull request #100 from tklauser/ucred-wrap-err
Browse files Browse the repository at this point in the history
Wrap correct error on unix.GetsockoptUcred failure
  • Loading branch information
dmcgowan committed Jan 21, 2022
2 parents a362a13 + 5b394b9 commit 332f4c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unixcreds_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (fn UnixCredentialsFunc) Handshake(_ context.Context, conn net.Conn) (net.C
}

if ucredErr != nil {
return nil, nil, fmt.Errorf("ttrpc.UnixCredentialsFunc: failed to retrieve socket peer credentials: %w", err)
return nil, nil, fmt.Errorf("ttrpc.UnixCredentialsFunc: failed to retrieve socket peer credentials: %w", ucredErr)
}

if err := fn(ucred); err != nil {
Expand Down

0 comments on commit 332f4c9

Please sign in to comment.