Mercurial > dovecot > core-2.2
changeset 16251:e41a13ae504d
dsync: If dsync fails due to lock timeout, give a better error message.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 08 Apr 2013 14:53:31 +0300 |
parents | b9758a044222 |
children | 54cdc5b6727c |
files | src/doveadm/dsync/dsync-brain.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-brain.c Mon Apr 08 14:49:07 2013 +0300 +++ b/src/doveadm/dsync/dsync-brain.c Mon Apr 08 14:53:31 2013 +0300 @@ -238,7 +238,12 @@ if (file_wait_lock(brain->lock_fd, brain->lock_path, F_WRLCK, FILE_LOCK_METHOD_FCNTL, brain->lock_timeout, &brain->lock) <= 0) { - i_error("Couldn't lock %s: %m", brain->lock_path); + if (errno == EAGAIN) { + i_error("Couldn't lock %s: Timed out after %u seconds", + brain->lock_path, brain->lock_timeout); + } else { + i_error("Couldn't lock %s: %m", brain->lock_path); + } break; } if (fstat(brain->lock_fd, &st1) < 0) {