mirror of
https://github.com/greatest-ape/aquatic.git
synced 2026-09-24 03:44:18 +00:00
udp: fix template error
This commit is contained in:
@@ -86,11 +86,21 @@ impl<I: Ip> TorrentData<I> {
|
||||
match (status, opt_removed_peer.is_some()) {
|
||||
// We added a new peer
|
||||
(PeerStatus::Leeching | PeerStatus::Seeding, false) => {
|
||||
statistics_sender.try_send(StatisticsMessage::PeerAdded(peer_id));
|
||||
if let Err(_) =
|
||||
statistics_sender.try_send(StatisticsMessage::PeerAdded(peer_id))
|
||||
{
|
||||
// Should never happen in practice
|
||||
::log::error!("Couldn't send StatisticsMessage::PeerAdded");
|
||||
}
|
||||
}
|
||||
// We removed an existing peer
|
||||
(PeerStatus::Stopped, true) => {
|
||||
statistics_sender.try_send(StatisticsMessage::PeerRemoved(peer_id));
|
||||
if let Err(_) =
|
||||
statistics_sender.try_send(StatisticsMessage::PeerRemoved(peer_id))
|
||||
{
|
||||
// Should never happen in practice
|
||||
::log::error!("Couldn't send StatisticsMessage::PeerRemoved");
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
@@ -149,7 +159,12 @@ impl<I: Ip> TorrentData<I> {
|
||||
self.num_seeders -= 1;
|
||||
}
|
||||
if config.statistics.extended {
|
||||
statistics_sender.try_send(StatisticsMessage::PeerRemoved(*peer_id));
|
||||
if let Err(_) =
|
||||
statistics_sender.try_send(StatisticsMessage::PeerRemoved(*peer_id))
|
||||
{
|
||||
// Should never happen in practice
|
||||
::log::error!("Couldn't send StatisticsMessage::PeerRemoved");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
{{ for value in peer_clients }}
|
||||
<tr>
|
||||
<td>{ value.0 }</td>
|
||||
<td>{ value.2 }</td>
|
||||
<td>{ value.1 }</td>
|
||||
</tr>
|
||||
{{ endfor }}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user