Mercurial > dovecot > core-2.2
changeset 13693:a538eec53922
imap-stats: Don't send IDLE command updates to stats service.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 14 Nov 2011 23:15:37 +0200 |
parents | 1cda9fe6d7fa |
children | 466badb63c0b |
files | src/plugins/imap-stats/imap-stats-plugin.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/imap-stats/imap-stats-plugin.c Mon Nov 14 23:15:17 2011 +0200 +++ b/src/plugins/imap-stats/imap-stats-plugin.c Mon Nov 14 23:15:37 2011 +0200 @@ -33,6 +33,12 @@ if (suser == NULL || !suser->track_commands) return; + if (strcasecmp(cmd->name, "IDLE") == 0) { + /* IDLE can run forever and waste stats process's memory while + waiting for it to timeout. don't send them. */ + return; + } + scmd = IMAP_STATS_IMAP_CONTEXT(cmd); if (scmd == NULL) { scmd = p_new(cmd->pool, struct stats_client_command, 1);