diff options
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(); |