diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-02-03 22:39:44 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-02-03 22:39:44 +0100 |
commit | cf77e06147da7b9de462cec8c173a1479607370c (patch) | |
tree | 84d6f79039e2614fbf1c89a3b174e138a08f2459 | |
parent | a61d96ff6a34990be1f2e2099bd8f6ced80fdf77 (diff) | |
download | rvnit-cf77e06147da7b9de462cec8c173a1479607370c.tar.gz rvnit-cf77e06147da7b9de462cec8c173a1479607370c.tar.xz rvnit-cf77e06147da7b9de462cec8c173a1479607370c.zip |
logger_loop: fix control logic
-rw-r--r-- | rvnit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rvnit.c b/rvnit.c index dcacdf1..4389477 100644 --- a/rvnit.c +++ b/rvnit.c @@ -441,7 +441,7 @@ logger_loop(void* ignored) if (n == 1 && (fds[1].revents & POLLHUP) && !(fds[1].revents & POLLIN)) { /* selflog was closed, end thread */ - break; + return 0; } for (nfds_t j = 0; j < nfds; j++) { @@ -465,6 +465,8 @@ closed_pipe: } } pthread_mutex_unlock(&services_lock); + + continue; } if (!(fds[j].revents & POLLIN)) @@ -488,7 +490,7 @@ closed_pipe: // https://www.greenend.org.uk/rjk/tech/poll.html if (j == 1 && n == 1) { /* selflog was closed, end thread */ - break; + return 0; } goto closed_pipe; } |