projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77aa301
)
Fix bug in IMAP idle, reduce IDLE timeout.
author
Brenden Matthews
<brenden@diddyinc.com>
Fri, 18 Jun 2010 18:29:05 +0000
(11:29 -0700)
committer
Brenden Matthews
<brenden@diddyinc.com>
Fri, 18 Jun 2010 18:29:05 +0000
(11:29 -0700)
src/mail.c
patch
|
blob
|
history
diff --git
a/src/mail.c
b/src/mail.c
index
60249b3
..
2c042a4
100644
(file)
--- a/
src/mail.c
+++ b/
src/mail.c
@@
-793,9
+793,9
@@
static void *imap_thread(void *arg)
while (1) {
/*
* RFC 2177 says we have to re-idle every 29 minutes.
while (1) {
/*
* RFC 2177 says we have to re-idle every 29 minutes.
- * We'll do it every 20 minutes to be safe.
+ * We'll do it every 10 minutes to be safe.
*/
*/
- fetchtimeout.tv_sec = 1200;
+ fetchtimeout.tv_sec = 600;
fetchtimeout.tv_usec = 0;
DBGP2("idling...");
FD_ZERO(&fdset);
fetchtimeout.tv_usec = 0;
DBGP2("idling...");
FD_ZERO(&fdset);
@@
-814,7
+814,7
@@
static void *imap_thread(void *arg)
fail++;
break;
}
fail++;
break;
}
- } else {
+ } else if (fetchtimeout.tv_sec > 0) {
fail++;
break;
}
fail++;
break;
}
@@
-837,7
+837,6
@@
static void *imap_thread(void *arg)
timed_thread_lock(mail->p_timed_thread);
if (mail->messages != messages) {
force_check = 1;
timed_thread_lock(mail->p_timed_thread);
if (mail->messages != messages) {
force_check = 1;
- mail->messages = messages;
}
timed_thread_unlock(mail->p_timed_thread);
}
}
timed_thread_unlock(mail->p_timed_thread);
}