str_append(str, ") - ");
vhost_count = I_MIN(vhost_count, host->vhost_count);
- last_updown_change = I_MAX(last_updown_change,
- host->last_updown_change);
str_printfa(str, "setting to state=%s vhosts=%u",
down ? "down" : "up", vhost_count);
i_warning("%s", str_c(str));
dir_host = NULL;
src_host = conn->dir->self_host;
}
+ if (update) {
+ /* Make sure the host's timestamp never shrinks.
+ Otherwise we might get into a loop where the up/down
+ state keeps switching. */
+ last_updown_change = I_MAX(last_updown_change,
+ host->last_updown_change);
+ }
}
if (update) {