mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-09 09:50:30 +00:00
Lol shadowing :(
This commit is contained in:
parent
9503e60444
commit
a937fcc477
@ -149,7 +149,7 @@ func (c *globalClient) Lookup(device protocol.DeviceID) (direct []string, relays
|
||||
resp.Body.Close()
|
||||
l.Debugln("globalClient.Lookup", qURL, 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{
|
||||
error: err,
|
||||
cacheFor: time.Duration(secs) * time.Second,
|
||||
|
Loading…
Reference in New Issue
Block a user