mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
aquatic_ws: move comment on empty info hashes to network.rs
This commit is contained in:
parent
786642f486
commit
23c2eff6f3
2 changed files with 2 additions and 2 deletions
|
|
@ -282,8 +282,6 @@ pub fn handle_scrape_request(
|
|||
&mut torrent_maps.ipv6
|
||||
};
|
||||
|
||||
// If request.info_hashes is empty, don't return scrape for all
|
||||
// torrents, even though reference server does it. It is too expensive.
|
||||
for info_hash in info_hashes.into_iter().take(num_to_take) {
|
||||
if let Some(torrent_data) = torrent_map.get(&info_hash) {
|
||||
let stats = ScrapeStatistics {
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue