]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict proxy client: Don't hang when doing an async commit.
authorTimo Sirainen <tss@iki.fi>
Mon, 26 Jan 2009 00:39:41 +0000 (19:39 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 26 Jan 2009 00:39:41 +0000 (19:39 -0500)
--HG--
branch : HEAD

src/lib-dict/dict-client.c

index a32681f491257ccb35ad9316dd47453f38310419..8fb8fb740caa204ce4b2df623916aa2485d8ba21 100644 (file)
@@ -473,10 +473,10 @@ static int client_dict_transaction_commit(struct dict_transaction_context *_ctx,
                                        ctx->id);
                if (client_dict_send_transaction_query(ctx, query) < 0)
                        ret = -1;
-               else if (ret < 0) {
-                       /* rollback sent, it has no reply */
+               else if (ret < 0 || async) {
+                       /* no reply */
                } else {
-                       /* read reply */
+                       /* sync commit, read reply */
                        line = client_dict_read_line(dict);
                        if (line == NULL || *line != DICT_PROTOCOL_REPLY_OK)
                                ret = -1;