mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_http_protocol: fail scrape parse with no info hashes
This commit is contained in:
parent
b7d61cecd9
commit
c02f8f228e
1 changed files with 4 additions and 0 deletions
|
|
@ -238,6 +238,10 @@ impl Request {
|
||||||
|
|
||||||
Ok(Request::Announce(request))
|
Ok(Request::Announce(request))
|
||||||
} else {
|
} else {
|
||||||
|
if info_hashes.is_empty() {
|
||||||
|
return Err(anyhow::anyhow!("No info hashes sent"));
|
||||||
|
}
|
||||||
|
|
||||||
let request = ScrapeRequest { info_hashes };
|
let request = ScrapeRequest { info_hashes };
|
||||||
|
|
||||||
Ok(Request::Scrape(request))
|
Ok(Request::Scrape(request))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue