mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-09-03 11:43:51 +00:00
parent
f323da00f8
commit
8bab413d83
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ use lemmy_db_schema::{
|
|||
utils::{ActualDbPool, DbPool},
|
||||
};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
use std::{collections::BinaryHeap, ops::Add, time::Duration};
|
||||
use std::{cmp::max, collections::BinaryHeap, ops::Add, time::Duration};
|
||||
use tokio::{
|
||||
sync::mpsc::{self, UnboundedSender},
|
||||
time::sleep,
|
||||
|
@ -265,7 +265,7 @@ impl InstanceWorker {
|
|||
SendActivityResult::Success(s) => {
|
||||
self.in_flight -= 1;
|
||||
if !s.was_skipped {
|
||||
self.state.fail_count = 0;
|
||||
self.state.fail_count = max(0, self.state.fail_count - 1);
|
||||
self.mark_instance_alive().await?;
|
||||
}
|
||||
self.successfuls.push(s);
|
||||
|
|
Loading…
Reference in a new issue