Remove patch 0031

This commit is contained in:
Dmitry 2018-08-14 09:46:11 +03:00 committed by Dmitry Shulyak
parent e935c7de99
commit 6c6fb4d0b3
2 changed files with 1 additions and 36 deletions

View File

@ -1,24 +0,0 @@
diff --git a/p2p/discv5/net.go b/p2p/discv5/net.go
index d0eae28f..25e75d50 100644
--- a/p2p/discv5/net.go
+++ b/p2p/discv5/net.go
@@ -641,7 +641,18 @@ loop:
}()
} else {
refreshDone = make(chan struct{})
- net.refresh(refreshDone)
+
+ done := make(chan struct{})
+ net.refresh(done)
+ <-done
+
+ // Refresh again only if there are no seeds.
+ // Also, sleep for some time to prevent from
+ // executing too often.
+ go func() {
+ time.Sleep(time.Millisecond * 100)
+ close(refreshDone)
+ }()
}
}
}

View File

@ -641,18 +641,7 @@ loop:
}()
} else {
refreshDone = make(chan struct{})
done := make(chan struct{})
net.refresh(done)
<-done
// Refresh again only if there are no seeds.
// Also, sleep for some time to prevent from
// executing too often.
go func() {
time.Sleep(time.Millisecond * 100)
close(refreshDone)
}()
net.refresh(refreshDone)
}
}
}