]> granicus.if.org Git - neomutt/commitdiff
imap_keepalive: cancel pending alarms. Otherwise, mutt will die
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Dec 1999 09:44:04 +0000 (09:44 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Dec 1999 09:44:04 +0000 (09:44 +0000)
frequently.

imap/util.c

index 4e98f46e0bfc1a0c23460467cc70f7e00bd7ecb3..3fc13db355b4b0276345d3c01388bf86137400e5 100644 (file)
@@ -342,14 +342,14 @@ int imap_wait_keepalive (pid_t pid)
   alarm (ImapCheckTimeout > 0 ? ImapCheckTimeout : 60);
   while (waitpid (pid, &rc, 0) < 0 && errno == EINTR)
   {
-    alarm (0);
-
     if (!option (OPTMSGERR))
       mutt_buffy_check (0);
 
     alarm (ImapCheckTimeout > 0 ? ImapCheckTimeout : 60);
   }
 
+  alarm (0);   /* cancel an possibly pending alarm */
+  
   sigaction (SIGALRM, &oldalrm, NULL);
   sigprocmask (SIG_BLOCK, &oldblocked, NULL);