fr_network_t *single_network; //!< for single-threaded mode
fr_worker_t *single_worker; //!< for single-threaded mode
-
- fr_schedule_network_t *last; //!< for round-robin among network threads
};
static _Thread_local int worker_id; //!< Internal ID of the current worker thread.
if (sc->el) {
nr = sc->single_network;
} else {
- if (!sc->last) sc->last = fr_dlist_head(&sc->networks);
+ fr_schedule_network_t *sn;
- nr = sc->last->nr;
- (void) talloc_get_type_abort(nr, fr_network_t);
+ /*
+ * @todo - round robin it among the listeners?
+ * or maybe add it to the same parent thread?
+ */
+ sn = fr_dlist_head(&sc->networks);
+ nr = sn->nr;
}
if (fr_network_listen_add(nr, li) < 0) return NULL;