Wrap correct error on raw.Control failure

Wrap cerr, the error returned by raw.Control.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
Tobias Klauser
2021-02-17 00:50:47 +01:00
parent 993aa01eac
commit bb1f659201
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ func getUnix(c *net.UnixConn) (*Creds, error) {
}
})
if cerr != nil {
return nil, fmt.Errorf("raw.Control: %w", err)
return nil, fmt.Errorf("raw.Control: %w", cerr)
}
if err != nil {
return nil, err