Log standby retry transitions and await the actual wake phase

This commit is contained in:
evgeny committed 2026-10-02 12:04:34 +03:00
1 parent 7ec5f931bb
commit df346fc097
2 files changed
+10 -2

No files matched your search

+8 -1
View File
@@ -173,6 +173,8 @@ static void tgc_cancel_pause(struct TOPO_GROUP_CONNECT* gc) {
static void tgc_resume(void* arg) {
struct TOPO_GROUP_CONNECT* gc = arg;
gc->pause_wait = NULL; gc->paused = 0;
DEBUG_INFO(DEBUG_CATEGORY_BGP, "group connect standby resumed: group=%016llx",
(unsigned long long)gc->group->group_id);
topo_group_connect_changed(gc->group);
}
#endif
@@ -181,7 +183,12 @@ static int tgc_pause(struct TOPO_GROUP_CONNECT* gc) {
#ifdef UTUN_HAVE_STANDBY
if (standby_get_sleep_tb() > 0) {
gc->pause_wait = standby_wait(gc, tgc_resume);
if (gc->pause_wait) { gc->paused = 1; return 1; }
if (gc->pause_wait) {
gc->paused = 1;
DEBUG_INFO(DEBUG_CATEGORY_BGP, "group connect standby wait: group=%016llx sleep_ms=%d",
(unsigned long long)gc->group->group_id, standby_get_sleep_tb() / 10);
return 1;
}
DEBUG_WARN(DEBUG_CATEGORY_BGP, "cannot wait for standby; using group retry timer");
}
#endif