Fix deletion of routing policy rules when terminating due to a signal
[project/relayd.git] / main.c
diff --git a/main.c b/main.c
index 318ba1c..24435b4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -670,9 +670,7 @@ static void die(int signo)
         * When we hit SIGTERM, clean up interfaces directly, so that we
         * won't leave our routing in an invalid state.
         */
-       cleanup_hosts();
-       free_interfaces();
-       exit(1);
+       uloop_end();
 }
 
 static int usage(const char *progname)