Skip to content

Commit 0c4e7dd

Browse files
committed
Add warning about scraping
1 parent 5a71531 commit 0c4e7dd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

server.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,15 @@ func (s *Server) Close() {
11821182
go s.socket.Close()
11831183
}
11841184

1185-
func (s *Server) GetPeers(ctx context.Context, addr Addr, infoHash int160.T, scrape bool, rl QueryRateLimiting) (ret QueryResult) {
1185+
func (s *Server) GetPeers(
1186+
ctx context.Context,
1187+
addr Addr,
1188+
infoHash int160.T,
1189+
// Be advised that if you set this, you might not get any "Return.values" back. That wasn't my
1190+
// reading of BEP 33 but there you go.
1191+
scrape bool,
1192+
rl QueryRateLimiting,
1193+
) (ret QueryResult) {
11861194
args := krpc.MsgArgs{
11871195
InfoHash: infoHash.AsByteArray(),
11881196
// TODO: Maybe IPv4-only Servers won't want IPv6 nodes?

0 commit comments

Comments
 (0)