diff --git a/pkg/executor/client/client.go b/pkg/executor/client/client.go index de363b88..4d32b261 100644 --- a/pkg/executor/client/client.go +++ b/pkg/executor/client/client.go @@ -160,7 +160,7 @@ func (c *Client) service() { } // TapService sends a TapServiceRequest over the request channel. -func (c *Client) TapService(fnMeta metav1.ObjectMeta, executorType fv1.ExecutorType, serviceURL *url.URL) { +func (c *Client) TapService(fnMeta metav1.ObjectMeta, executorType fv1.ExecutorType, serviceURL url.URL) { c.requestChan <- TapServiceRequest{ FnMetadata: metav1.ObjectMeta{ Name: fnMeta.Name, diff --git a/pkg/router/functionHandler.go b/pkg/router/functionHandler.go index b6f6340a..97923d55 100644 --- a/pkg/router/functionHandler.go +++ b/pkg/router/functionHandler.go @@ -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) {