]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Deinit auth request handler before pass/userdbs
authorTimo Sirainen <tss@iki.fi>
Fri, 4 Jun 2010 15:15:28 +0000 (16:15 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 4 Jun 2010 15:15:28 +0000 (16:15 +0100)
--HG--
branch : HEAD

src/auth/main.c

index 66906e14721538b2a325d22e44a0787a8d443ba9..eed2bb6d2ad546bb9e46894da2d8e10813925f71 100644 (file)
@@ -160,8 +160,13 @@ static void main_deinit(void)
        auth_master_connections_deinit();
         auth_worker_server_deinit();
 
-       auths_deinit();
        auth_request_handler_deinit();
+       /* there may still be some async auth requests left, but above
+          functions should have marked all of them as destroyed. pass/userdb
+          deinits should abort the pending requests, which still triggers
+          callbacks, which should avoid crashes by checking the destroyed
+          state. */
+       auths_deinit();
        passdb_cache_deinit();
 
        mech_register_deinit(&mech_reg);