]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "round robin among network threads"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 27 Jul 2020 19:48:58 +0000 (15:48 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 27 Jul 2020 23:14:25 +0000 (19:14 -0400)
This reverts commit 6f9baf3fa57a03ace86404cd747a1806bd6eee64.

src/lib/io/schedule.c

index 7652ebd1e556b98ec540410dd1db98c87197dc55..bf404d6d25f36be0f795dcc7dc444b648f9792b5 100644 (file)
@@ -146,8 +146,6 @@ struct fr_schedule_s {
 
        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.
@@ -833,10 +831,14 @@ fr_network_t *fr_schedule_listen_add(fr_schedule_t *sc, fr_listen_t *li)
        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;