mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
fix possible panic
This commit is contained in:
parent
46eabb7d91
commit
91dc55562c
@ -207,7 +207,7 @@ func (r *proxyHandler) updateAPIService(apiService *apiregistrationapi.APIServic
|
|||||||
serviceNamespace: apiService.Spec.Service.Namespace,
|
serviceNamespace: apiService.Spec.Service.Namespace,
|
||||||
}
|
}
|
||||||
newInfo.proxyRoundTripper, newInfo.transportBuildingError = restclient.TransportFor(newInfo.restConfig)
|
newInfo.proxyRoundTripper, newInfo.transportBuildingError = restclient.TransportFor(newInfo.restConfig)
|
||||||
if newInfo.transportBuildingError == nil && r.proxyTransport.Dial != nil {
|
if newInfo.transportBuildingError == nil && r.proxyTransport != nil && r.proxyTransport.Dial != nil {
|
||||||
switch transport := newInfo.proxyRoundTripper.(type) {
|
switch transport := newInfo.proxyRoundTripper.(type) {
|
||||||
case *http.Transport:
|
case *http.Transport:
|
||||||
transport.Dial = r.proxyTransport.Dial
|
transport.Dial = r.proxyTransport.Dial
|
||||||
|
Loading…
Reference in New Issue
Block a user