diff --git a/aquatic_http_protocol/src/request.rs b/aquatic_http_protocol/src/request.rs index 95f0fdd..9b8e2ee 100644 --- a/aquatic_http_protocol/src/request.rs +++ b/aquatic_http_protocol/src/request.rs @@ -238,6 +238,10 @@ impl Request { Ok(Request::Announce(request)) } else { + if info_hashes.is_empty() { + return Err(anyhow::anyhow!("No info hashes sent")); + } + let request = ScrapeRequest { info_hashes }; Ok(Request::Scrape(request))