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
0914d4e0
Commit
0914d4e0
authored
Nov 09, 2017
by
Evgeny Danilenko
Committed by
Felix Lange
Nov 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
les: fix misuse of WaitGroup (#15365)
parent
9619a610
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fetcher.go
les/fetcher.go
+3
-3
No files found.
les/fetcher.go
View file @
0914d4e0
...
@@ -117,16 +117,16 @@ func newLightFetcher(pm *ProtocolManager) *lightFetcher {
...
@@ -117,16 +117,16 @@ func newLightFetcher(pm *ProtocolManager) *lightFetcher {
maxConfirmedTd
:
big
.
NewInt
(
0
),
maxConfirmedTd
:
big
.
NewInt
(
0
),
}
}
pm
.
peers
.
notify
(
f
)
pm
.
peers
.
notify
(
f
)
f
.
pm
.
wg
.
Add
(
1
)
go
f
.
syncLoop
()
go
f
.
syncLoop
()
return
f
return
f
}
}
// syncLoop is the main event loop of the light fetcher
// syncLoop is the main event loop of the light fetcher
func
(
f
*
lightFetcher
)
syncLoop
()
{
func
(
f
*
lightFetcher
)
syncLoop
()
{
f
.
pm
.
wg
.
Add
(
1
)
defer
f
.
pm
.
wg
.
Done
()
requesting
:=
false
requesting
:=
false
defer
f
.
pm
.
wg
.
Done
()
for
{
for
{
select
{
select
{
case
<-
f
.
pm
.
quitSync
:
case
<-
f
.
pm
.
quitSync
:
...
...
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