From: Stephan Bosch Date: Sat, 23 Jul 2022 23:29:18 +0000 (+0200) Subject: lib-auth-client: auth-master - Allow duplicate calls to auth_master_unset_io() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f415e76ddbe18d7111170f94d9f884abfb2dfab3;p=thirdparty%2Fdovecot%2Fcore.git lib-auth-client: auth-master - Allow duplicate calls to auth_master_unset_io() --- diff --git a/src/lib-auth-client/auth-master.c b/src/lib-auth-client/auth-master.c index 7ba36303d5..c5869080b3 100644 --- a/src/lib-auth-client/auth-master.c +++ b/src/lib-auth-client/auth-master.c @@ -357,11 +357,13 @@ void auth_master_set_io(struct auth_master_connection *conn) void auth_master_unset_io(struct auth_master_connection *conn) { + if (conn->ioloop == NULL) + return; + if (conn->prev_ioloop != NULL) { io_loop_set_current(conn->prev_ioloop); } - if (conn->ioloop != NULL && - (conn->flags & AUTH_MASTER_FLAG_NO_INNER_IOLOOP) == 0) { + if ((conn->flags & AUTH_MASTER_FLAG_NO_INNER_IOLOOP) == 0) { io_loop_set_current(conn->ioloop); connection_switch_ioloop_to(&conn->conn, conn->ioloop); connection_input_halt(&conn->conn);