Remove download patch 0027

This commit is contained in:
Dmitry Shulyak 2018-05-02 08:58:40 +03:00 committed by Pedro Pombeiro
parent 123382cdf1
commit 7f81323fdc
1 changed files with 0 additions and 13 deletions

View File

@ -1,13 +0,0 @@
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index eb64f05a..3e8c9cb1 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -230,6 +230,7 @@ func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, chain BlockC
},
trackStateReq: make(chan *stateReq),
}
+ dl.cancelWg.Add(1) // Add a sentinel to avoid getting flagged as a race condition in case Cancel is called before spawnSync
dl.downloads.Add(1) // Add a sentinel value to avoid waiting with zero count and getting a race condition signaled when terminating Downloader before starting sync
go dl.qosTuner()
go dl.stateFetcher()