Fix err declaration shadowing

This commit is contained in:
Joel Speed 2018-12-20 10:46:19 +00:00
parent e200bd5c20
commit d37cc2889e
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB

View File

@ -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