From d37cc2889e5f06d25d7bf7c0fbb9761c9fff1177 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Thu, 20 Dec 2018 10:46:19 +0000 Subject: [PATCH] Fix err declaration shadowing --- oauthproxy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oauthproxy.go b/oauthproxy.go index cc5fa14..96d8c86 100644 --- a/oauthproxy.go +++ b/oauthproxy.go @@ -671,7 +671,8 @@ func (p *OAuthProxy) Authenticate(rw http.ResponseWriter, req *http.Request) int saveSession = true } - if ok, err := p.provider.RefreshSessionIfNeeded(session); err != nil { + var ok bool + if ok, err = p.provider.RefreshSessionIfNeeded(session); err != nil { log.Printf("%s removing session. error refreshing access token %s %s", remoteAddr, err, session) clearSession = true session = nil