aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver.c b/driver.c
index a0596ec0..ab441b74 100644
--- a/driver.c
+++ b/driver.c
@@ -1114,8 +1114,8 @@ const int maxfetch; /* maximum number of messages to fetch */
*/
if (run.poll_interval
&& !ctl->wehavesentauthnote
- && ((ctl->wehaveauthed && ++ctl->authfailcount == 10)
- || ++ctl->authfailcount == 3)
+ && ((ctl->wehaveauthed && ++ctl->authfailcount >= 10)
+ || (!ctl->wehaveauthed && ++ctl->authfailcount >= 3))
&& !open_warning_by_mail(ctl, (struct msgblk *)NULL))
{
ctl->wehavesentauthnote = 1;
@@ -1509,6 +1509,7 @@ closeUp:
err = PS_SYNTAX;
}
+ set_timeout(0); /* cancel any pending alarm */
signal(SIGALRM, alrmsave);
signal(SIGPIPE, pipesave);
return(err);