Fixed a small bug major problem with email delay timeout catching.

This commit is contained in:
Seth Hall 2011-12-15 12:41:05 -05:00
parent 2d97e25eeb
commit f1f5719f83
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@ event Notice::notice(n: Notice::Info) &priority=10
n$email_body_sections[|n$email_body_sections|] = output; n$email_body_sections[|n$email_body_sections|] = output;
delete n$email_delay_tokens["hostnames-src"]; delete n$email_delay_tokens["hostnames-src"];
} }
timeout max_email_delay+5secs { } timeout max_email_delay { }
} }
if ( n?$dst ) if ( n?$dst )
{ {
@ -36,6 +36,6 @@ event Notice::notice(n: Notice::Info) &priority=10
n$email_body_sections[|n$email_body_sections|] = output; n$email_body_sections[|n$email_body_sections|] = output;
delete n$email_delay_tokens["hostnames-dst"]; delete n$email_delay_tokens["hostnames-dst"];
} }
timeout max_email_delay+5secs { } timeout max_email_delay { }
} }
} }

View file

@ -369,7 +369,7 @@ function email_notice_to(n: Notice::Info, dest: string, extend: bool)
{ {
if ( |n$email_delay_tokens| > 0 ) if ( |n$email_delay_tokens| > 0 )
{ {
# If we still are within the max_email_delay, keep delaying # If we still are within the max_email_delay, keep delaying.
if ( n$ts + max_email_delay > network_time() ) if ( n$ts + max_email_delay > network_time() )
schedule 1sec { delay_sending_email(n, dest, extend) }; schedule 1sec { delay_sending_email(n, dest, extend) };
else else