From a389b8f2f9c55b76fe5a28c3f1fea798ed37aa98 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 13 Apr 2026 16:11:04 -0400 Subject: Allow packet_stream_reconnect() to cut off a connecting stream. Cleanup timer. Signed-off-by: Andrew Opalach --- src/util/thread/thread_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util/thread/thread_linux.c') diff --git a/src/util/thread/thread_linux.c b/src/util/thread/thread_linux.c index cd80d06..c9edce5 100644 --- a/src/util/thread/thread_linux.c +++ b/src/util/thread/thread_linux.c @@ -91,9 +91,9 @@ void nn_cond_init(struct nn_cond *cond) void nn_cond_wait(struct nn_cond *cond, struct nn_mutex *mutex) { cond->condition = false; - while (!cond->condition) { + do { pthread_cond_wait(&cond->cond, &mutex->mutex); - } + } while (!cond->condition); } bool nn_cond_is_waiting(struct nn_cond *cond) -- cgit v1.2.3-101-g0448