When creating a new context, set lastcmd to now.
[citadel.git] / citadel / context.c
index 922f0675db24dda2dd6d56054a09cd09f990bedb..f6bbf58b635d95fdd1b6fd6b7aae348adfaebdcf 100644 (file)
@@ -383,6 +383,7 @@ CitContext *CreateNewContext(void) {
        me->cs_pid = ++next_pid;
        me->prev = NULL;
        me->next = ContextList;
+       me->lastcmd = time(NULL);       /* set lastcmd to now to prevent idle timer infanticide */
        ContextList = me;
        if (me->next != NULL) {
                me->next->prev = me;