mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 11:05:45 +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)
|
||||
if err != nil {
|
||||
if runtime.GOOS == "darwin" {
|
||||
extConn, err := connectMacOSAppSandbox()
|
||||
if err != nil {
|
||||
log.Printf("safesocket: failed to connect to Tailscale IPNExtension: %v", err)
|
||||
} else {
|
||||
return extConn, nil
|
||||
extConn, extErr := connectMacOSAppSandbox()
|
||||
if extErr != nil {
|
||||
return nil, fmt.Errorf("safesocket: failed to connect to %v: %v; failed to connect to Tailscale IPNExtension: %v", path, err, extErr)
|
||||
}
|
||||
return extConn, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return pipe, err
|
||||
return pipe, nil
|
||||
}
|
||||
|
||||
// TODO(apenwarr): handle magic cookie auth
|
||||
|
Loading…
Reference in New Issue
Block a user