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
0d81f0bd
Commit
0d81f0bd
authored
Sep 11, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Oct 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some bugfixes and added logging
parent
b016e377
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
routing.go
routing.go
+4
-5
No files found.
routing.go
View file @
0d81f0bd
...
...
@@ -152,15 +152,14 @@ func (dht *IpfsDHT) FindProvidersAsync2(ctx context.Context, key u.Key, count in
peers
:=
dht
.
routingTables
[
0
]
.
NearestPeers
(
kb
.
ConvertKey
(
key
),
AlphaValue
)
for
_
,
pp
:=
range
peers
{
ppp
:=
pp
go
func
()
{
pmes
,
err
:=
dht
.
findProvidersSingle
(
ctx
,
ppp
,
key
,
0
)
go
func
(
p
*
peer
.
Peer
)
{
pmes
,
err
:=
dht
.
findProvidersSingle
(
p
,
key
,
0
,
timeout
)
if
err
!=
nil
{
u
.
PErr
(
"%v
\n
"
,
err
)
return
}
dht
.
addPeerListAsync
(
key
,
pmes
.
GetP
roviderP
eers
(),
ps
,
count
,
peerOut
)
}()
dht
.
addPeerListAsync
(
key
,
pmes
.
GetPeers
(),
ps
,
count
,
peerOut
)
}(
pp
)
}
}()
...
...
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