summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2024-05-10 09:41:08 +0800
committerJSDurand <mmemmew@gmail.com>2024-05-10 09:41:08 +0800
commitc409b9089945737c27a28ca6719dbd45e8a4ac16 (patch)
treef2ce16df53957de7ab0355950e749a1f0f72e286
parent52bd828d104e21220ee4747e8f10131b2fce9adc (diff)
mail: Do not creating multiple processesHEADmaster
* mail.el (durand-mail-update): If there is already a process that is fetching mails, we should not create more processes to do the same thing.
-rw-r--r--mail.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/mail.el b/mail.el
index 6493ce3..47d7858 100644
--- a/mail.el
+++ b/mail.el
@@ -308,7 +308,8 @@ If FOREGROUND-P is `0', do not fetch mails, but just run
((and (numberp foreground-p)
(= foreground-p 0))
(run-hooks 'durand-mail-update-hook))
- ((make-process
+ ((not (get-process "durand-mail-update"))
+ (make-process
:name "durand-mail-update"
:command durand-mail-update-command
:filter (cond (foreground-p #'durand-mail-update-filter))