Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
x0x
dht
Commits
634b37ba
Commit
634b37ba
authored
Nov 03, 2019
by
Matt Joiner
Browse files
Add debug logging to Announce.getPeers
parent
98c5167b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
announce.go
announce.go
+2
-2
No files found.
announce.go
View file @
634b37ba
...
...
@@ -168,13 +168,13 @@ func (a *Announce) maybeAnnouncePeer(to Addr, token *string, peerId *krpc.ID) {
func
(
a
*
Announce
)
getPeers
(
addr
Addr
,
cteh
*
conntrack
.
EntryHandle
)
{
// log.Printf("sending get_peers to %v", node)
m
,
writes
,
_
:=
a
.
server
.
getPeers
(
context
.
TODO
(),
addr
,
a
.
infoHash
)
m
,
writes
,
err
:=
a
.
server
.
getPeers
(
context
.
TODO
(),
addr
,
a
.
infoHash
)
if
writes
==
0
{
cteh
.
Forget
()
}
else
{
cteh
.
Done
()
}
// log.Print(
err)
a
.
server
.
logger
()
.
Printf
(
"Announce.server.getPeers result: m.Y=%v, writes=%v, err=%v"
,
m
.
Y
,
writes
,
err
)
// log.Printf("get_peers response error from %v: %v", node, err)
// Register suggested nodes closer to the target info-hash.
if
m
.
R
!=
nil
&&
m
.
SenderID
()
!=
nil
{
...
...
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