From: Art Cancro Date: Sun, 20 Mar 2011 06:16:13 +0000 (-0400) Subject: Close sockets properly at logout X-Git-Tag: v8.11~812 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;ds=sidebyside;h=ffa2f0d76075e6e404b050b340307affcf8cd79b;p=citadel.git Close sockets properly at logout --- diff --git a/citadel/context.c b/citadel/context.c index c6575d3db..a04198db2 100644 --- a/citadel/context.c +++ b/citadel/context.c @@ -352,13 +352,11 @@ void RemoveContext (CitContext *con) become_session(con); CtdlUserLogout(); PerformSessionHooks(EVT_STOP); + client_close(); /* If the client is still connected, blow 'em away. */ become_session(NULL); syslog(LOG_NOTICE, "[%3d] Session ended.\n", con->cs_pid); - /* If the client is still connected, blow 'em away. */ - client_close(); - /* If using AUTHMODE_LDAP, free the DN */ if (con->ldap_dn) { free(con->ldap_dn);