if (client->ssl_proxy != NULL)
ssl_proxy_free(&client->ssl_proxy);
client->v.destroy(client);
- if (client_unref(&client) &&
- master_service_get_service_count(master_service) == 1) {
+ if (client_unref(&client) && initial_service_count == 1) {
/* as soon as this connection is done with proxying
(or whatever), the process will die. there's no need for
- authentication anymore, so close the connection. */
+ authentication anymore, so close the connection.
+ do this only with initial service_count=1, in case there
+ are other clients with pending authentications */
auth_client_disconnect(auth_client);
}
login_client_destroyed();
extern bool closing_down;
extern struct anvil_client *anvil;
extern const char *login_rawlog_dir;
+extern unsigned int initial_service_count;
extern const struct login_settings *global_login_settings;
extern void **global_other_settings;
bool closing_down;
struct anvil_client *anvil;
const char *login_rawlog_dir = NULL;
+unsigned int initial_service_count;
const struct login_settings *global_login_settings;
void **global_other_settings;
restrict_access_by_env(NULL, TRUE);
if (allow_core_dumps)
restrict_access_allow_coredumps(TRUE);
+ initial_service_count = master_service_get_service_count(master_service);
}
static void main_init(const char *login_socket)