]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Threads shouldn't drop stopping loops
authorMaria Matejka <mq@ucw.cz>
Fri, 7 Jun 2024 11:19:51 +0000 (13:19 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Jun 2024 07:23:50 +0000 (09:23 +0200)
sysdep/unix/io-loop.c

index 3c64ab4f748e6f19255bde9457d90921cd1bee6a..01cf74006e886aaff4b2d608f70e685d5e48af96 100644 (file)
@@ -666,7 +666,6 @@ birdloop_take(struct birdloop_pickup_group *group)
   struct birdloop *loop = NULL;
 
   LOCK_DOMAIN(attrs, group->domain);
-
   int drop =
     this_thread->busy_active &&
     (group->thread_busy_count < group->thread_count) &&
@@ -683,7 +682,7 @@ birdloop_take(struct birdloop_pickup_group *group)
     WALK_LIST2(loop, n, this_thread->loops, n)
     {
       birdloop_enter(loop);
-      if (ev_active(&loop->event))
+      if (ev_active(&loop->event) && !loop->stopped)
       {
        LOOP_TRACE(loop, DL_SCHEDULING, "Dropping from thread");
        /* Pass to another thread */