changeset 21721:f149ee35322e

pop3: Set process title before syncing mailbox. The syncing could be taking a long time, so it's useful to have the username in the process title during that.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Tue, 07 Mar 2017 14:36:45 -0500
parents a4f8acdfb3d5
children 5571a8162b42
files src/pop3/pop3-client.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/pop3/pop3-client.c	Wed Mar 08 10:07:37 2017 -0500
+++ b/src/pop3/pop3-client.c	Tue Mar 07 14:36:45 2017 -0500
@@ -458,6 +458,9 @@
         enum mailbox_flags flags;
 	const char *ident, *errmsg;
 
+	/* refresh proctitle before a potentially long-running init_mailbox() */
+	pop3_refresh_proctitle();
+
 	flags = MAILBOX_FLAG_POP3_SESSION;
 	if (!client->set->pop3_no_flag_updates)
 		flags |= MAILBOX_FLAG_DROP_RECENT;
@@ -484,8 +487,6 @@
 			"CONNECT\t", my_pid, "\tpop3/", ident, "\n", NULL));
 		client->anvil_sent = TRUE;
 	}
-
-	pop3_refresh_proctitle();
 	return 0;
 }