|
|
@ -188,7 +188,6 @@ struct generator_data { |
|
|
|
int subproxies_generated; |
|
|
|
int subproxies_generated; |
|
|
|
|
|
|
|
|
|
|
|
int proxy_notify_id; // Globally increasing notify id
|
|
|
|
int proxy_notify_id; // Globally increasing notify id
|
|
|
|
server_instance_t *si; /* Current server instance */ |
|
|
|
|
|
|
|
pthread_t pth_uprecv; // User proxy receive thread
|
|
|
|
pthread_t pth_uprecv; // User proxy receive thread
|
|
|
|
pthread_t pth_psend; // Combined proxy send thread
|
|
|
|
pthread_t pth_psend; // Combined proxy send thread
|
|
|
|
|
|
|
|
|
|
|
@ -205,7 +204,7 @@ struct generator_data { |
|
|
|
share_msg_t *shares; |
|
|
|
share_msg_t *shares; |
|
|
|
int64_t share_id; |
|
|
|
int64_t share_id; |
|
|
|
|
|
|
|
|
|
|
|
server_instance_t *current_si; |
|
|
|
server_instance_t *current_si; // Current server instance
|
|
|
|
|
|
|
|
|
|
|
|
proxy_instance_t *current_proxy; |
|
|
|
proxy_instance_t *current_proxy; |
|
|
|
}; |
|
|
|
}; |
|
|
@ -3378,10 +3377,8 @@ static void *server_watchdog(void *arg) |
|
|
|
if (server_alive(ckp, si, true) && !best) |
|
|
|
if (server_alive(ckp, si, true) && !best) |
|
|
|
best = si; |
|
|
|
best = si; |
|
|
|
} |
|
|
|
} |
|
|
|
if (best && best != gdata->si) { |
|
|
|
if (best && best != gdata->current_si) |
|
|
|
gdata->si = best; |
|
|
|
|
|
|
|
send_proc(ckp->generator, "reconnect"); |
|
|
|
send_proc(ckp->generator, "reconnect"); |
|
|
|
} |
|
|
|
|
|
|
|
cksleep_ms_r(&timer_t, 5000); |
|
|
|
cksleep_ms_r(&timer_t, 5000); |
|
|
|
} |
|
|
|
} |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|