From f7b7539debd493b381ea06973799624be7291e3b Mon Sep 17 00:00:00 2001 From: Chadlia Jerad Date: Mon, 18 Mar 2024 05:53:09 +0100 Subject: [PATCH] Fix the exit of th thread that connects to transients --- core/federated/RTI/rti_remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 9b4094dc5..f62770aea 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -2113,9 +2113,9 @@ void* lf_connect_to_transient_federates_thread(void* nothing) { // The following blocks until a federate connects. int socket_id = -1; while (1) { - // if (!rti_remote->all_persistent_federates_exited) { - // return NULL; - // } + if (rti_remote->all_persistent_federates_exited) { + return NULL; + } socket_id = accept(rti_remote->socket_descriptor_TCP, &client_fd, &client_length); if (socket_id >= 0) { // Got a socket