Mercurial > dovecot > core-2.2
changeset 20626:9df9bdd84ab1
dict-client: Improved timeout error message.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 10 Aug 2016 17:56:14 +0300 |
parents | 3faece727565 |
children | 464988cb3980 |
files | src/lib-dict/dict-client.c |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-dict/dict-client.c Wed Aug 10 17:54:29 2016 +0300 +++ b/src/lib-dict/dict-client.c Wed Aug 10 17:56:14 2016 +0300 @@ -70,7 +70,6 @@ struct timeout *to_requests; struct timeout *to_idle; unsigned int idle_msecs; - struct timeval last_input; ARRAY(struct client_dict_cmd *) cmds; struct client_dict_transaction_context *transactions; @@ -195,12 +194,11 @@ cmds = array_get(&dict->cmds, &count); i_assert(count > 0); - int input_diff = timeval_diff_msecs(&ioloop_timeval, &dict->last_input); int cmd_diff = timeval_diff_msecs(&ioloop_timeval, &cmds[0]->start_time); (void)client_dict_reconnect(dict, t_strdup_printf( - "Timeout: No input from dict for %u.%03u secs " + "Dict server timeout: %s " "(%u commands pending, oldest sent %u.%03u secs ago: %s)", - input_diff/1000, input_diff%1000, count, + connection_input_timeout_reason(&dict->conn.conn), count, cmd_diff/1000, cmd_diff%1000, cmds[0]->query), &error); } @@ -379,7 +377,6 @@ bool finished; int diff; - dict->last_input = ioloop_timeval; if (dict->to_requests != NULL) timeout_reset(dict->to_requests);