File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,12 @@ func listComponentsHandlerRemoteCfg(host service.Host) http.HandlerFunc {
6666 return
6767 }
6868
69- listComponentsHandlerInternal (svc .Data ().(remotecfg.Data ).Host , w , r )
69+ data := svc .Data ().(remotecfg.Data )
70+ if data .Host == nil {
71+ http .Error (w , "remote config service startup in progress" , http .StatusInternalServerError )
72+ return
73+ }
74+ listComponentsHandlerInternal (data .Host , w , r )
7075 }
7176}
7277
@@ -108,7 +113,13 @@ func getComponentHandlerRemoteCfg(host service.Host) http.HandlerFunc {
108113 return
109114 }
110115
111- getComponentHandlerInternal (svc .Data ().(remotecfg.Data ).Host , w , r )
116+ data := svc .Data ().(remotecfg.Data )
117+ if data .Host == nil {
118+ http .Error (w , "remote config service startup in progress" , http .StatusInternalServerError )
119+ return
120+ }
121+
122+ getComponentHandlerInternal (data .Host , w , r )
112123 }
113124}
114125
You can’t perform that action at this time.
0 commit comments