mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +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,
|
||||
}
|
||||
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) {
|
||||
case *http.Transport:
|
||||
transport.Dial = r.proxyTransport.Dial
|
||||
|
Loading…
Reference in New Issue
Block a user