/* hide the disconnect log message, because the client didn't
actually log out */
client->disconnected = TRUE;
+ client->hibernated = TRUE;
client_destroy(client, NULL);
*_client = NULL;
}
before it starts, and refresh proctitle so it's clear that it's
doing autoexpunging. We've also sent DISCONNECT to anvil already,
because this is background work and shouldn't really be counted
- as an active IMAP session for the user. */
+ as an active IMAP session for the user.
+
+ Don't autoexpunge if the client is hibernated - it shouldn't be any
+ different from the non-hibernating IDLE case. For frequent
+ hibernations it could also be doing unnecessarily much work. */
imap_refresh_proctitle();
- mail_user_autoexpunge(client->user);
+ if (!client->hibernated)
+ mail_user_autoexpunge(client->user);
mail_user_unref(&client->user);
/* free the i/ostreams after mail_user_unref(), which could trigger
unsigned int sync_seen_deletes:1;
unsigned int logged_out:1;
unsigned int disconnected:1;
+ unsigned int hibernated:1;
unsigned int destroyed:1;
unsigned int handling_input:1;
unsigned int syncing:1;