Skip to content

Commit

Permalink
fix possible panic
Browse files Browse the repository at this point in the history
Kubernetes-commit: 91dc55562c9e7742a1cfdaa6d1db0b1ce262ff95
  • Loading branch information
hzxuzhonghu authored and k8s-publishing-bot committed Jan 4, 2018
1 parent de656f3 commit eac4918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apiserver/handler_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eac4918

Please sign in to comment.