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
52e620c6
Commit
52e620c6
authored
Mar 24, 2017
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add addresses from received provider records
Thanks @mildred for catching this and providing a patch.
parent
55cd2914
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
routing.go
routing.go
+3
-0
No files found.
routing.go
View file @
52e620c6
...
...
@@ -349,6 +349,9 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key *cid.Cid,
// Add unique providers from request, up to 'count'
for
_
,
prov
:=
range
provs
{
if
prov
.
ID
!=
dht
.
self
{
dht
.
peerstore
.
AddAddrs
(
prov
.
ID
,
prov
.
Addrs
,
pstore
.
TempAddrTTL
)
}
log
.
Debugf
(
"got provider: %s"
,
prov
)
if
ps
.
TryAdd
(
prov
.
ID
)
{
log
.
Debugf
(
"using provider: %s"
,
prov
)
...
...
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