add pre- and post-connection hooks to -async
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@896 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
cbf652d96b
commit
104c8b1710
@ -55,6 +55,7 @@ sub new {
|
||||
$self->{mode} = 'connect';
|
||||
$self->load_plugins;
|
||||
$self->load_logging;
|
||||
$self->run_hooks("pre-connection");
|
||||
return $self;
|
||||
}
|
||||
|
||||
@ -83,6 +84,7 @@ sub reset_for_next_message {
|
||||
};
|
||||
$self->{mode} = 'cmd';
|
||||
$self->{_extras} = {};
|
||||
warn "resetting...\n";
|
||||
}
|
||||
|
||||
sub respond {
|
||||
@ -147,6 +149,12 @@ sub disconnect {
|
||||
$self->close;
|
||||
}
|
||||
|
||||
sub close {
|
||||
my Qpsmtpd::PollServer $self = shift;
|
||||
$self->run_hooks("post-connection");
|
||||
$self->SUPER::close;
|
||||
}
|
||||
|
||||
sub start_conversation {
|
||||
my Qpsmtpd::PollServer $self = shift;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user