aquatic_ws: move comment on empty info hashes to network.rs

This commit is contained in:
Joakim Frostegård 2021-11-01 19:25:14 +01:00
parent 786642f486
commit 23c2eff6f3
2 changed files with 2 additions and 2 deletions

View file

@ -305,6 +305,8 @@ impl Connection {
let info_hashes = if let Some(info_hashes) = info_hashes {
info_hashes
} else {
// If request.info_hashes is empty, don't return scrape for all
// torrents, even though reference server does it. It is too expensive.
let out_message = OutMessage::ErrorResponse(ErrorResponse {
action: Some(ErrorResponseAction::Scrape),
failure_reason: "Full scrapes are not allowed".into(),