]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-client: Assert-crash if dict ioloop gets any unexpected IOs or timeouts
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 22 Mar 2021 15:05:24 +0000 (17:05 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 6 May 2021 06:28:50 +0000 (06:28 +0000)
src/lib-dict/dict-client.c

index ee69f056b3fb18d1079bb389b2639f9e9b582059..82e374d0d44e6b1f0f7ecac3197081b253ab26ba 100644 (file)
@@ -810,6 +810,7 @@ static void client_dict_wait(struct dict *_dict)
        if (array_count(&dict->cmds) == 0)
                return;
 
+       i_assert(io_loop_is_empty(dict->dict.ioloop));
        dict->dict.prev_ioloop = current_ioloop;
        io_loop_set_current(dict->dict.ioloop);
        dict_switch_ioloop(_dict);
@@ -820,6 +821,7 @@ static void client_dict_wait(struct dict *_dict)
        dict->dict.prev_ioloop = NULL;
 
        dict_switch_ioloop(_dict);
+       i_assert(io_loop_is_empty(dict->dict.ioloop));
 }
 
 static bool client_dict_switch_ioloop(struct dict *_dict)