mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
call disconnect script only if the user was on connected state
This commit is contained in:
@@ -257,8 +257,9 @@ void remove_proc(main_server_st * s, struct proc_st *proc, unsigned k)
|
||||
kill(proc->pid, SIGTERM);
|
||||
|
||||
remove_from_script_list(s, proc);
|
||||
if (proc->username[0] != 0)
|
||||
if (proc->status == PS_AUTH_COMPLETED) {
|
||||
user_disconnected(s, proc);
|
||||
}
|
||||
|
||||
/* close any pending sessions */
|
||||
if (s->config->session_control != 0 && proc->active_sid) {
|
||||
|
||||
Reference in New Issue
Block a user