From 4cd3e65692fa21c9afa9357149a5f69ed1dd92b4 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 2 Nov 2016 22:42:43 -0700 Subject: [PATCH] Another bug due to initialization/assignment confusion --- router/functionHandler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/router/functionHandler.go b/router/functionHandler.go index 80fc6dbe..e134ddf6 100644 --- a/router/functionHandler.go +++ b/router/functionHandler.go @@ -51,7 +51,9 @@ func (fh *functionHandler) handler(responseWriter http.ResponseWriter, request * if err != nil { // Cache miss: request the Pool Manager to make a new service. log.Printf("Not cached, getting new service for %v", fh.Function) - serviceUrl, poolErr := fh.getServiceForFunction() + + var poolErr error + serviceUrl, poolErr = fh.getServiceForFunction() if poolErr != nil { log.Printf("Failed to get service for function (%v,%v): %v", fh.Function.Name, fh.Function.Uid, poolErr)