{
if (!session->doing_poll) return 0;
+ session->doing_poll = false;
+
/*
* We tried to increase the min_tx during a polling
* sequence. That isn't kosher, so we instead waited
if (!session->remote_demand_mode) {
fr_assert(session->ev_timeout != NULL);
fr_assert(session->ev_packet != NULL);
- session->doing_poll = false;
bfd_stop_control(session);
bfd_start_control(session);
return 1;
}
- session->doing_poll = false;
-
return bfd_stop_control(session);
}
*/
session->desired_min_tx_interval = value;
- bfd_stop_control(session);
- session->doing_poll = 0;
+ /*
+ * Already polling, don't change anything.
+ */
+ if (session->doing_poll) return;
+
+ bfd_stop_control(session);
bfd_start_poll(session);
}