On shutdown, only join EV thread if active

This commit is contained in:
emanuel 2023-04-18 11:04:45 +01:00
parent dfa34c4ab0
commit 36f86e78e6
1 changed files with 2 additions and 1 deletions

View File

@ -584,7 +584,8 @@ int main() {
// Exit
cleanup:
pthread_join(facilities.evcsn_service, NULL);
if (facilities.evm_args.activate)
pthread_join(facilities.evcsn_service, NULL);
pthread_join(facilities.ca_service, NULL);
pthread_join(facilities.den_service, NULL);
pthread_join(facilities.infrastructure_service, NULL);