Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-kad-dht
Commits
ce68333c
Commit
ce68333c
authored
Nov 22, 2016
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use res.NextSync() instead of res.Next() to avoid using a channel.
parent
a72dd86f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
providers/providers.go
providers/providers.go
+5
-1
No files found.
providers/providers.go
View file @
ce68333c
...
...
@@ -118,7 +118,11 @@ func loadProvSet(dstore ds.Datastore, k *cid.Cid) (*providerSet, error) {
}
out
:=
newProviderSet
()
for
e
:=
range
res
.
Next
()
{
for
{
e
,
ok
:=
res
.
NextSync
()
if
!
ok
{
break
}
if
e
.
Error
!=
nil
{
log
.
Error
(
"got an error: "
,
e
.
Error
)
continue
...
...
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