mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 10:30:41 +08:00
radicle/node: Announcements only have one result
For commands that may return multiple responses, a loop makes sense, but inventory announcements should expect exactly one response.
This commit is contained in:
@@ -1413,9 +1413,9 @@ impl Handle for Node {
|
||||
}
|
||||
|
||||
fn announce_inventory(&mut self) -> Result<(), Error> {
|
||||
for line in self.call::<Success>(Command::AnnounceInventory, DEFAULT_TIMEOUT)? {
|
||||
line?;
|
||||
}
|
||||
self.call::<Success>(Command::AnnounceInventory, DEFAULT_TIMEOUT)?
|
||||
.next()
|
||||
.ok_or(Error::EmptyResponse)??;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user