Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/axum-http-tracker-server/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ pub struct Environment<S> {

impl<S> Environment<S> {
/// Add a torrent to the tracker
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) -> bool {
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) {
self.container
.tracker_core_container
.in_memory_torrent_repository
.upsert_peer(info_hash, peer, None)
.await
.handle_announcement(info_hash, peer, None)
.await;
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/axum-rest-tracker-api-server/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ where
S: std::fmt::Debug + std::fmt::Display,
{
/// Add a torrent to the tracker
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) -> bool {
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) {
self.container
.tracker_core_container
.in_memory_torrent_repository
.upsert_peer(info_hash, peer, None)
.await
.handle_announcement(info_hash, peer, None)
.await;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/http-tracker-core/src/services/announce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl AnnounceService {

let announce_data = self
.announce_handler
.announce(
.handle_announcement(
&announce_request.info_hash,
&mut peer,
&remote_client_addr.ip(),
Expand Down
6 changes: 3 additions & 3 deletions packages/http-tracker-core/src/services/scrape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl ScrapeService {
let scrape_data = if self.authentication_is_required() && !self.is_authenticated(maybe_key).await {
ScrapeData::zeroed(&scrape_request.info_hashes)
} else {
self.scrape_handler.scrape(&scrape_request.info_hashes).await?
self.scrape_handler.handle_scrape(&scrape_request.info_hashes).await?
};

let remote_client_addr = resolve_remote_client_addr(&self.core_config.net.on_reverse_proxy.into(), client_ip_sources)?;
Expand Down Expand Up @@ -291,7 +291,7 @@ mod tests {
let original_peer_ip = peer.ip();
container
.announce_handler
.announce(&info_hash, &mut peer, &original_peer_ip, &PeersWanted::AsManyAsPossible)
.handle_announcement(&info_hash, &mut peer, &original_peer_ip, &PeersWanted::AsManyAsPossible)
.await
.unwrap();

Expand Down Expand Up @@ -482,7 +482,7 @@ mod tests {
let original_peer_ip = peer.ip();
container
.announce_handler
.announce(&info_hash, &mut peer, &original_peer_ip, &PeersWanted::AsManyAsPossible)
.handle_announcement(&info_hash, &mut peer, &original_peer_ip, &PeersWanted::AsManyAsPossible)
.await
.unwrap();

Expand Down
Loading