Make sure non-responding hooks are called appropriately

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@903 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2008-05-12 17:19:31 +00:00
parent c7c6e3afb9
commit 4578cd6eff

View File

@ -56,7 +56,7 @@ sub new {
$self->load_plugins;
$self->load_logging;
my ($rc, @msg) = $self->run_hooks("pre-connection");
my ($rc, @msg) = $self->run_hooks_no_respond("pre-connection");
if ($rc == DENYSOFT || $rc == DENYSOFT_DISCONNECT) {
@msg = ("Sorry, try again later")
unless @msg;
@ -164,7 +164,7 @@ sub disconnect {
sub close {
my Qpsmtpd::PollServer $self = shift;
$self->run_hooks("post-connection");
$self->run_hooks_no_respond("post-connection");
$self->connection->reset;
$self->SUPER::close;
}