X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fnet.c;fp=src%2Fnet.c;h=e52363e4a685f8586d6652639e452e9867df6e1c;hb=0acbdba62ea6798427366a12aaeebccbf7226b26;hp=3eec9a647b5e3b2e77116323b05637b5dcdab8cf;hpb=708825e4b229a4a1e182e682e2d1021fa2765396;p=tinc diff --git a/src/net.c b/src/net.c index 3eec9a64..e52363e4 100644 --- a/src/net.c +++ b/src/net.c @@ -199,7 +199,7 @@ static void timeout_handler(void *arg) { if(rand() % 3 == 0) { logger(LOG_ERR, "Shutting down, check configuration of all nodes for duplicate Names!"); - abort(); + running = false; return; } @@ -259,7 +259,7 @@ int reload_configuration(void) { if(!read_server_config()) { logger(LOG_ERR, "Unable to reread configuration file, exitting."); - abort(); + running = false; return EINVAL; } @@ -352,8 +352,7 @@ int main_loop(void) { event_add(&timeout_event); - - while(true) { + while(running) { mutex_unlock(&mutex); usleep(1000000); mutex_lock(&mutex);