syslog(LOG_NOTICE, "[%3d] Session ended.\n", con->cs_pid);
- /*
- * If the client is still connected, blow 'em away.
- * if the socket is 0, its already gone or was never there.
- */
- if (con->client_socket != 0)
- {
- syslog(LOG_DEBUG, "Closing socket %d\n", con->client_socket);
- if (close(con->client_socket)) syslog(LOG_NOTICE, "close() : %s", strerror(errno));
- }
+ /* If the client is still connected, blow 'em away. */
+ client_close();
/* If using AUTHMODE_LDAP, free the DN */
if (con->ldap_dn) {