mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +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()
|
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user