changeset 4986:5088f394fa72 HEAD

Don't keep a connection open to dovecot-auth when we're only proxying.
author Timo Sirainen <tss@iki.fi>
date Thu, 04 Jan 2007 00:59:55 +0200
parents c2a4ea08d681
children 7179db893d3e
files src/login-common/main.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/login-common/main.c	Thu Jan 04 00:40:34 2007 +0200
+++ b/src/login-common/main.c	Thu Jan 04 00:59:55 2007 +0200
@@ -47,6 +47,9 @@
 		/* last login finished, close all communications
 		   to master process */
 		master_close();
+		/* we might still be proxying. close the connection to
+		   dovecot-auth, since it's not needed anymore. */
+		auth_client_free(&auth_client);
 	}
 }
 
@@ -336,7 +339,8 @@
 	ssl_proxy_deinit();
 	login_proxy_deinit();
 
-	auth_client_free(&auth_client);
+	if (auth_client != NULL)
+		auth_client_free(&auth_client);
 	clients_deinit();
 	master_deinit();