Reset the cooldown everytime there is an action

This commit is contained in:
Natsu Kagami 2020-02-10 19:09:37 -05:00
parent 90be66b950
commit 15232b1598
Signed by: nki
GPG key ID: 73376E117CD20735

View file

@ -60,8 +60,8 @@ impl ReactionWatcher {
{
self.channels.lock().expect("Poisoned!").push(send);
}
let timeout = after(duration);
loop {
let timeout = after(duration);
let r = select! {
recv(reactions) -> r => { let (r, is_added) = r.unwrap(); h.handle_reaction(&*r, is_added) },
recv(timeout) -> _ => break,