Lol shadowing :(

This commit is contained in:
Jakob Borg 2015-12-01 11:19:39 +01:00
parent 9503e60444
commit a937fcc477

View File

@ -149,7 +149,7 @@ func (c *globalClient) Lookup(device protocol.DeviceID) (direct []string, relays
resp.Body.Close() resp.Body.Close()
l.Debugln("globalClient.Lookup", qURL, resp.Status) l.Debugln("globalClient.Lookup", qURL, resp.Status)
err := errors.New(resp.Status) err := errors.New(resp.Status)
if secs, err := strconv.Atoi(resp.Header.Get("Retry-After")); err == nil && secs > 0 { if secs, atoiErr := strconv.Atoi(resp.Header.Get("Retry-After")); atoiErr == nil && secs > 0 {
err = lookupError{ err = lookupError{
error: err, error: err,
cacheFor: time.Duration(secs) * time.Second, cacheFor: time.Duration(secs) * time.Second,