We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eef93a0 commit 932b59eCopy full SHA for 932b59e
1 file changed
intra/ipn/proxies.go
@@ -702,12 +702,13 @@ func (px *proxifier) clearpins() (int, int) {
702
// ProxyFor implements Proxies.
703
func (px *proxifier) ProxyFor(id string) (Proxy, error) {
704
p, err := px.proxyFor(id)
705
- if errors.Is(err, errProxyNotFound) {
706
- log.W("proxy: for: %s; not found; waiting for %ds...", maxWaitPeriodSec, id)
707
- time.Sleep(maxWaitPeriodSec)
+ if !errors.Is(err, errProxyNotFound) {
+ return p, err
708
}
709
- p, err = px.proxyFor(id)
710
- return p, err
+
+ log.W("proxy: for: %s; not found; waiting for %ds...", id, maxWaitPeriodSec)
+ time.Sleep(time.Duration(maxWaitPeriodSec) * time.Second)
711
+ return px.proxyFor(id)
712
713
714
func (px *proxifier) proxyFor(id string) (Proxy, error) {
0 commit comments