From 445a1a93e9afb97565a187e2ad8fa0e8845ff36c Mon Sep 17 00:00:00 2001 From: Dengfeng Liu Date: Tue, 7 Jan 2025 15:59:36 +0800 Subject: [PATCH] fix: enhance ping callback to skip server ping in local auth mode Signed-off-by: Dengfeng Liu --- src/ping_thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ping_thread.c b/src/ping_thread.c index ead29030..e9ec65ca 100644 --- a/src/ping_thread.c +++ b/src/ping_thread.c @@ -114,9 +114,11 @@ make_captive_domains_query_responsable(void) static void ping_work_cb(evutil_socket_t fd, short event, void *arg) { make_captive_domains_query_responsable(); + if (is_local_auth_mode()) { debug(LOG_DEBUG, "auth mode is local, no need to ping auth server"); mark_auth_online(); + return; } struct wd_request_context *request_ctx = (struct wd_request_context *)arg;