diff options
author | Maria Matejka <mq@ucw.cz> | 2022-01-26 21:16:19 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-02-03 10:30:33 +0100 |
commit | 127862f626f39d52b758084931e0fbdc91db745c (patch) | |
tree | 6047220bdce8262b52a80305750d2f17cf4759ff /sysdep | |
parent | 0f6ea957541dc59b15f4e8a42e9ed006345a2a70 (diff) |
Asynchronous neighbor notifications fixes
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/io-loop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c index ec805dce..1d3a555f 100644 --- a/sysdep/unix/io-loop.c +++ b/sysdep/unix/io-loop.c @@ -498,7 +498,9 @@ void birdloop_unlink(struct birdloop *loop) { ASSERT_DIE(birdloop_inside(loop)); - loop->links--; + ASSERT_DIE(loop->links); + if (!--loop->links) + birdloop_ping(loop); } static void @@ -541,7 +543,7 @@ birdloop_main(void *arg) birdloop_enter(loop); - if (loop->stopped) + if (loop->stopped && !loop->links) break; loop_begin = current_time(); |