mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-09 20:39:55 +00:00
expect reason
This commit is contained in:
parent
5ee10a3775
commit
9738ed5660
1 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,10 @@ impl ConnectionHandle {
|
||||||
}
|
}
|
||||||
/// Bans the peer for the given `duration`.
|
/// Bans the peer for the given `duration`.
|
||||||
pub fn ban_peer(&self, duration: Duration) {
|
pub fn ban_peer(&self, duration: Duration) {
|
||||||
#[expect(clippy::let_underscore_must_use, reason = "TODO: handle error")]
|
#[expect(
|
||||||
|
clippy::let_underscore_must_use,
|
||||||
|
reason = "error means peer is already banned; fine to ignore"
|
||||||
|
)]
|
||||||
let _ = self.ban.set(BanPeer(duration));
|
let _ = self.ban.set(BanPeer(duration));
|
||||||
self.token.cancel();
|
self.token.cancel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue