Skip to content

Commit

Permalink
fix: streamline ping logic and update version to 8.01.2264
Browse files Browse the repository at this point in the history
Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Jan 7, 2025
1 parent ef86a04 commit 37c629a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions src/ping_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ 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();
}

struct wd_request_context *request_ctx = (struct wd_request_context *)arg;
t_gateway_setting *gw_settings = get_gateway_settings();
if (!gw_settings) {
Expand Down Expand Up @@ -144,15 +150,7 @@ ping_work_cb(evutil_socket_t fd, short event, void *arg) {
void
thread_ping(void *arg)
{
s_config *config = config_get_config();

make_captive_domains_query_responsable();

if (config->auth_server_mode == AUTH_MODE_LOCAL) {
debug(LOG_DEBUG, "auth mode is local, no need to ping auth server");
mark_auth_online();
} else
wd_request_loop(ping_work_cb);
wd_request_loop(ping_work_cb);
}

static long
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

#ifndef _VERSION_
#define _VERSION_
#define VERSION "8.01.2261"
#define VERSION "8.01.2264"
#endif

0 comments on commit 37c629a

Please sign in to comment.