mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
TCP health probes shouldn't be logged at INFO level
Resolves: #362 Signed-off-by: Alan Jowett alan.jowett@microsoft.com
This commit is contained in:
@@ -192,6 +192,8 @@ const char *discon_reason_to_str(unsigned reason)
|
|||||||
return "unspecified error";
|
return "unspecified error";
|
||||||
case REASON_SESSION_TIMEOUT:
|
case REASON_SESSION_TIMEOUT:
|
||||||
return "session timeout";
|
return "session timeout";
|
||||||
|
case REASON_HEALTH_PROBE:
|
||||||
|
return "TCP health probe";
|
||||||
default:
|
default:
|
||||||
snprintf(tmp, sizeof(tmp), "unknown (%u)", reason);
|
snprintf(tmp, sizeof(tmp), "unknown (%u)", reason);
|
||||||
return tmp;
|
return tmp;
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ void remove_proc(main_server_st * s, struct proc_st *proc, unsigned flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mslog(s, proc, LOG_INFO, "user disconnected (reason: %s, rx: %"PRIu64", tx: %"PRIu64")",
|
mslog(s, proc, (proc->discon_reason != REASON_HEALTH_PROBE ? LOG_INFO : LOG_DEBUG), "user disconnected (reason: %s, rx: %"PRIu64", tx: %"PRIu64")",
|
||||||
discon_reason_to_str(proc->discon_reason), proc->bytes_in, proc->bytes_out);
|
discon_reason_to_str(proc->discon_reason), proc->bytes_in, proc->bytes_out);
|
||||||
|
|
||||||
pid = remove_from_script_list(s, proc);
|
pid = remove_from_script_list(s, proc);
|
||||||
|
|||||||
Reference in New Issue
Block a user