Skip to content

Commit

Permalink
Fix the exit of th thread that connects to transients
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadliaJerad committed Mar 18, 2024
1 parent a0bf3b2 commit f7b7539
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/federated/RTI/rti_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7b7539

Please sign in to comment.