mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
safesocket: reduce log spam while running integration tests
Instead of logging lsof execution failures to stdout, incorporate them into the returned error. While we're here, make it clear that the file success case always returns a nil error. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
f80193fa4c
commit
130c5e727b
@ -28,16 +28,15 @@ func connect(path string, port uint16) (net.Conn, error) {
|
|||||||
pipe, err := net.Dial("unix", path)
|
pipe, err := net.Dial("unix", path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if runtime.GOOS == "darwin" {
|
if runtime.GOOS == "darwin" {
|
||||||
extConn, err := connectMacOSAppSandbox()
|
extConn, extErr := connectMacOSAppSandbox()
|
||||||
if err != nil {
|
if extErr != nil {
|
||||||
log.Printf("safesocket: failed to connect to Tailscale IPNExtension: %v", err)
|
return nil, fmt.Errorf("safesocket: failed to connect to %v: %v; failed to connect to Tailscale IPNExtension: %v", path, err, extErr)
|
||||||
} else {
|
|
||||||
return extConn, nil
|
|
||||||
}
|
}
|
||||||
|
return extConn, nil
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return pipe, err
|
return pipe, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(apenwarr): handle magic cookie auth
|
// TODO(apenwarr): handle magic cookie auth
|
||||||
|
Loading…
Reference in New Issue
Block a user