Process PerformJobsNeeded::AvoidDos case explicitly

This commit is contained in:
Alexander Krotov
2019-11-28 16:33:48 +01:00
committed by Floris Bruynooghe
parent 95b90a59dc
commit 02fe3d1b99

View File

@@ -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.",);
}