From e1d78dc2faaa06e7c3f71ef674a71e4de2f0758e Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Tue, 21 Nov 2017 10:22:31 +0100 Subject: New upstream version 5.6.1 --- src/libstrongswan/processing/watcher.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/libstrongswan/processing') diff --git a/src/libstrongswan/processing/watcher.c b/src/libstrongswan/processing/watcher.c index df6066b19..4466e91eb 100644 --- a/src/libstrongswan/processing/watcher.c +++ b/src/libstrongswan/processing/watcher.c @@ -513,6 +513,7 @@ METHOD(watcher_t, remove_, void, private_watcher_t *this, int fd) { entry_t *entry, *prev = NULL; + bool found = FALSE; this->mutex->lock(this->mutex); while (TRUE) @@ -530,6 +531,7 @@ METHOD(watcher_t, remove_, void, break; } entry = remove_entry(this, entry, prev); + found = TRUE; continue; } prev = entry; @@ -541,8 +543,10 @@ METHOD(watcher_t, remove_, void, } this->condvar->wait(this->condvar, this->mutex); } - - update(this); + if (found) + { + update(this); + } this->mutex->unlock(this->mutex); } -- cgit v1.2.3