Skip to content

Help for this issue to understand some things that i need to do #4877

Closed Answered by mattsse
DoTheBestToGetTheBest asked this question in Help
Discussion options

You must be logged in to vote

the terminate command variant needs to be sent like this:

#[inline]
fn send_to_service(&self, cmd: Discv4Command) {
let _ = self.to_service.send(cmd).map_err(|err| {
debug!(
target : "discv4",
%err,
"channel capacity reached, dropping command",
)
});
}

see also this for reference

/// Adds the ip to the ban list.
///
/// This will prevent any future inclusion in the table
pub fn ban_ip(&self, ip: IpAddr) {
let cmd = Discv4Command::BanIp(ip);
self.send_to_service(cmd);

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@DoTheBestToGetTheBest
Comment options

@DoTheBestToGetTheBest
Comment options

@mattsse
Comment options

@DoTheBestToGetTheBest
Comment options

Answer selected by DoTheBestToGetTheBest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants