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
38d8a0d9
Commit
38d8a0d9
authored
Sep 22, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better logging for ping
parent
f20eef94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
routing.go
routing.go
+2
-1
No files found.
routing.go
View file @
38d8a0d9
...
...
@@ -335,10 +335,11 @@ func (dht *IpfsDHT) findPeerMultiple(ctx context.Context, id peer.ID) (*peer.Pee
// Ping a peer, log the time it took
func
(
dht
*
IpfsDHT
)
Ping
(
ctx
context
.
Context
,
p
*
peer
.
Peer
)
error
{
// Thoughts: maybe this should accept an ID and do a peer lookup?
u
.
DOut
(
"
Enter Ping.
\n
"
)
u
.
DOut
(
"
[%s] ping %s start
\n
"
,
dht
.
self
.
ID
.
Pretty
(),
p
.
ID
.
Pretty
()
)
pmes
:=
newMessage
(
Message_PING
,
""
,
0
)
_
,
err
:=
dht
.
sendRequest
(
ctx
,
p
,
pmes
)
u
.
DOut
(
"[%s] ping %s end (err = %s)
\n
"
,
dht
.
self
.
ID
.
Pretty
(),
p
.
ID
.
Pretty
(),
err
)
return
err
}
...
...
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