mirror of
https://github.com/chatmail/core.git
synced 2026-05-24 17:26:30 +03:00
Process PerformJobsNeeded::AvoidDos case explicitly
This commit is contained in:
committed by
Floris Bruynooghe
parent
95b90a59dc
commit
02fe3d1b99
@@ -508,12 +508,14 @@ pub fn perform_smtp_idle(context: &Context) {
|
||||
let &(ref lock, ref cvar) = &*context.smtp_state.clone();
|
||||
let mut state = lock.lock().unwrap();
|
||||
|
||||
if state.perform_jobs_needed == PerformJobsNeeded::AtOnce {
|
||||
match state.perform_jobs_needed {
|
||||
PerformJobsNeeded::AtOnce => {
|
||||
info!(
|
||||
context,
|
||||
"SMTP-idle will not be started because of waiting jobs.",
|
||||
);
|
||||
} else {
|
||||
}
|
||||
PerformJobsNeeded::Not | PerformJobsNeeded::AvoidDos => {
|
||||
let dur = get_next_wakeup_time(context, Thread::Smtp);
|
||||
|
||||
loop {
|
||||
@@ -528,6 +530,7 @@ pub fn perform_smtp_idle(context: &Context) {
|
||||
state.idle = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
info!(context, "SMTP-idle ended.",);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user