if(rand() % 3 == 0) {
logger(LOG_ERR, "Shutting down, check configuration of all nodes for duplicate Names!");
- abort();
+ running = false;
return;
}
if(!read_server_config()) {
logger(LOG_ERR, "Unable to reread configuration file, exitting.");
- abort();
+ running = false;
return EINVAL;
}
event_add(&timeout_event);
-
- while(true) {
+ while(running) {
mutex_unlock(&mutex);
usleep(1000000);
mutex_lock(&mutex);