summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09e1bfa)
raw | patch | inline | side by side (parent: 09e1bfa)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 6 Jul 2010 11:00:32 +0000 (13:00 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 6 Jul 2010 11:00:32 +0000 (13:00 +0200) |
Otherwise it may take up to $Interval seconds until all read threads
shut down. This bug was introduced in version 4.8.4 (commit dbe1a7d).
shut down. This bug was introduced in version 4.8.4 (commit dbe1a7d).
src/plugin.c | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index 5ff21c668d4637ed2720d6a13dbdcd56d7439d6e..84a5abf240bba3226c450afda0a23e38931711f1 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
* we need to re-evaluate the condition every time
* pthread_cond_timedwait returns. */
rc = 0;
- while (!timeout_reached(rf->rf_next_read) && rc == 0) {
+ while ((read_loop != 0)
+ && !timeout_reached(rf->rf_next_read)
+ && rc == 0)
+ {
rc = pthread_cond_timedwait (&read_cond, &read_lock,
&rf->rf_next_read);
}
- /* Must hold `real_lock' when accessing `rf->rf_type'. */
+ /* Must hold `read_lock' when accessing `rf->rf_type'. */
rf_type = rf->rf_type;
pthread_mutex_unlock (&read_lock);