Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
7cee2509
Unverified
Commit
7cee2509
authored
Aug 10, 2020
by
Martin Holst Swende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/downloader: allow all timers to exit
parent
8f240978
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
statesync.go
eth/downloader/statesync.go
+1
-7
No files found.
eth/downloader/statesync.go
View file @
7cee2509
...
...
@@ -197,12 +197,7 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
}
// Start a timer to notify the sync loop if the peer stalled.
req
.
timer
=
time
.
AfterFunc
(
req
.
timeout
,
func
()
{
select
{
case
timeout
<-
req
:
case
<-
s
.
done
:
// Prevent leaking of timer goroutines in the unlikely case where a
// timer is fired just before exiting runStateSync.
}
timeout
<-
req
})
active
[
req
.
peer
.
id
]
=
req
}
...
...
@@ -214,7 +209,6 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
// are marked as idle and de facto _are_ idle.
func
(
d
*
Downloader
)
spindownStateSync
(
active
map
[
string
]
*
stateReq
,
finished
[]
*
stateReq
,
timeout
chan
*
stateReq
,
peerDrop
chan
*
peerConnection
)
{
log
.
Trace
(
"State sync spinning down"
,
"active"
,
len
(
active
),
"finished"
,
len
(
finished
))
for
len
(
active
)
>
0
{
var
(
req
*
stateReq
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment