]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
vici: Signal waiting threads when skipping disconnected connections
authorTobias Brunner <tobias@strongswan.org>
Fri, 7 May 2021 13:32:49 +0000 (15:32 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 21 Jun 2021 07:59:15 +0000 (09:59 +0200)
If two threads are waiting in find_entry() and remove_entry(),
respectively, and the former is woken first, the latter remains stuck
as it won't get signaled.

src/libcharon/plugins/vici/vici_socket.c

index babbc6d4bc5b8f731d0b6426b2cb7428fac5733e..58d33587d7b25e6babba387b4a01dd862b0c9924 100644 (file)
@@ -191,6 +191,7 @@ static entry_t* find_entry(private_vici_socket_t *this, stream_t *stream,
                        }
                        if (entry->disconnecting)
                        {
+                               entry->cond->signal(entry->cond);
                                continue;
                        }
                        candidate = TRUE;