X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincd.c;fp=src%2Ftincd.c;h=8a4c1f394830d8e5a8c6e7a407c87cf05bd052a1;hb=d2949381713c35210a43391524494c639f6f1d48;hp=20d0e297108fba5e218fccf2127707da44605a0c;hpb=c5373d9fc0c8e3dfb6529b35bf44efe58410e0c7;p=tinc diff --git a/src/tincd.c b/src/tincd.c index 20d0e297..8a4c1f39 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -56,6 +56,7 @@ #include "version.h" #include "random.h" #include "sandbox.h" +#include "watchdog.h" /* If nonzero, display usage information and exit. */ static bool show_help = false; @@ -694,8 +695,16 @@ int main2(int argc, char **argv) { try_outgoing_connections(); +#ifdef HAVE_WATCHDOG + watchdog_start(); +#endif + status = main_loop(); +#ifdef HAVE_WATCHDOG + watchdog_stop(); +#endif + /* Shutdown properly. */ end: