Avoid tapservice call to executor with empty URL (#2402)
We should avoid tap service call to executor if service URL retrieved from executor is empty. Added sanity checks to ensure that. Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -455,10 +455,10 @@ func (roundTripper *RetryingRoundTripper) closeContext() {
|
||||
}
|
||||
|
||||
func (fh *functionHandler) tapService(fn *fv1.Function, serviceURL *url.URL) {
|
||||
if fh.executor == nil {
|
||||
if fh.executor == nil || serviceURL == nil {
|
||||
return
|
||||
}
|
||||
fh.executor.TapService(fn.ObjectMeta, fn.Spec.InvokeStrategy.ExecutionStrategy.ExecutorType, serviceURL)
|
||||
fh.executor.TapService(fn.ObjectMeta, fn.Spec.InvokeStrategy.ExecutionStrategy.ExecutorType, *serviceURL)
|
||||
}
|
||||
|
||||
func (fh functionHandler) handler(responseWriter http.ResponseWriter, request *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user