dovecot-2.2: dict-redis: Don't crash if we get disconnected duri...

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 23 15:26:47 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/e721788d2946
changeset: 16871:e721788d2946
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 23 15:26:35 2013 +0300
description:
dict-redis: Don't crash if we get disconnected during an open transaction.

diffstat:

 src/lib-dict/dict-redis.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r a18a53f242ba -r e721788d2946 src/lib-dict/dict-redis.c
--- a/src/lib-dict/dict-redis.c	Wed Oct 23 15:16:52 2013 +0300
+++ b/src/lib-dict/dict-redis.c	Wed Oct 23 15:26:35 2013 +0300
@@ -591,6 +591,11 @@
 
 	if (ctx->failed)
 		return -1;
+	if (!dict->connected) {
+		/* disconnected during transaction */
+		ctx->failed = TRUE;
+		return -1;
+	}
 	if (ctx->ctx.changed)
 		return 0;
 


More information about the dovecot-cvs mailing list