Skip to content

Commit

Permalink
remove unecessary if
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrato committed May 17, 2022
1 parent 8c50bd1 commit e410fbc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/kube/proxy/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1657,12 +1657,10 @@ func (f *Forwarder) makeSessionForwarder(sess *clusterSession) (*forward.Forward
if err := http2.ConfigureTransport(transport); err != nil {
return nil, trace.Wrap(err)
}
} else {
} else if sess.tlsConfig != nil {
// when certificate-authority-data is not provided in kubeconfig the tlsConfig can be nil,
// meaning that we will use the system default CA store.
if sess.tlsConfig != nil {
sess.tlsConfig.NextProtos = nil
}
sess.tlsConfig.NextProtos = nil
}

rt := http.RoundTripper(transport)
Expand Down

0 comments on commit e410fbc

Please # to comment.