dovecot-2.2: auth worker: Log a warning if master disconnects us...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Mar 12 10:26:27 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/9ddb41a2c6c7
changeset: 17157:9ddb41a2c6c7
user: Timo Sirainen <tss at iki.fi>
date: Wed Mar 12 12:26:09 2014 +0200
description:
auth worker: Log a warning if master disconnects us while handling a long request.
diffstat:
src/auth/auth-worker-client.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r 4856ff35f7be -r 9ddb41a2c6c7 src/auth/auth-worker-client.c
--- a/src/auth/auth-worker-client.c Wed Mar 12 12:19:09 2014 +0200
+++ b/src/auth/auth-worker-client.c Wed Mar 12 12:26:09 2014 +0200
@@ -109,15 +109,19 @@
string_t *str)
{
time_t cmd_duration = time(NULL) - client->cmd_start;
+ const char *p;
if (worker_restart_request)
o_stream_nsend_str(client->output, "RESTART\n");
o_stream_nsend(client->output, str_data(str), str_len(str));
if (o_stream_nfinish(client->output) < 0 && request != NULL &&
cmd_duration > AUTH_WORKER_WARN_DISCONNECTED_LONG_CMD_SECS) {
+ p = strchr(str_c(str), '\t');
+ p = p == NULL ? "BUG" : t_strcut(p+1, '\t');
+
i_warning("Auth master disconnected us while handling "
- "request for %s for %ld secs",
- request->user, (long)cmd_duration);
+ "request for %s for %ld secs (result=%s)",
+ request->user, (long)cmd_duration, p);
}
}
More information about the dovecot-cvs
mailing list