aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2018-08-15 04:59:18 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-08-15 04:59:18 +0800
commitb52bb31b767a3e31266e6138e24f7226ebbd8882 (patch)
treebe8abdb45feb500bf0718110f457e50f2cb2accf
parentb2ddb1fcbf77771d0693ee5a00f8ae1cd4c0f87c (diff)
downloadgo-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.tar
go-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.tar.gz
go-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.tar.bz2
go-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.tar.lz
go-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.tar.xz
go-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.tar.zst
go-tangerine-b52bb31b767a3e31266e6138e24f7226ebbd8882.zip
p2p/discv5: add delay to refresh cycle when no seed nodes are found (#16994)
-rw-r--r--p2p/discv5/net.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/discv5/net.go b/p2p/discv5/net.go
index 4c39c0553..b93c93d64 100644
--- a/p2p/discv5/net.go
+++ b/p2p/discv5/net.go
@@ -678,7 +678,7 @@ func (net *Network) refresh(done chan<- struct{}) {
}
if len(seeds) == 0 {
log.Trace("no seed nodes found")
- close(done)
+ time.AfterFunc(time.Second*10, func() { close(done) })
return
}
for _, n := range seeds {