mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 09:45:08 +00:00
all: fix nilness issues
Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:

committed by
Andrew Dunham

parent
c5208f8138
commit
a217f1fccf
@@ -594,7 +594,7 @@ func acmeKey(cs certStore) (crypto.Signer, error) {
|
||||
return nil, errors.New("acme/autocert: invalid account key found in cache")
|
||||
}
|
||||
return parsePrivateKey(priv.Bytes)
|
||||
} else if err != nil && !errors.Is(err, ipn.ErrStateNotExist) {
|
||||
} else if !errors.Is(err, ipn.ErrStateNotExist) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,7 @@ func (s *Server) handleProxyConnectConn(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
hj, ok := w.(http.Hijacker)
|
||||
if !ok {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
http.Error(w, "CONNECT hijack unavailable", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
c, br, err := hj.Hijack()
|
||||
|
@@ -444,8 +444,7 @@ func (p *Prefs) Equals(p2 *Prefs) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
return p != nil && p2 != nil &&
|
||||
p.ControlURL == p2.ControlURL &&
|
||||
return p.ControlURL == p2.ControlURL &&
|
||||
p.RouteAll == p2.RouteAll &&
|
||||
p.AllowSingleHosts == p2.AllowSingleHosts &&
|
||||
p.ExitNodeID == p2.ExitNodeID &&
|
||||
|
Reference in New Issue
Block a user