From 5f4dfdc6838ed742a8faf7c874277073c62f34a9 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Mon, 25 Feb 2019 23:42:46 +0100 Subject: [PATCH] Reduce the registration timeout to keep the connection open --- edge_utils.c | 2 +- sn.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/edge_utils.c b/edge_utils.c index 13bb7c9..0244e47 100644 --- a/edge_utils.c +++ b/edge_utils.c @@ -32,7 +32,7 @@ #define REGISTER_SUPER_INTERVAL_DFL 60 /* sec */ #endif /* #if defined(DEBUG) */ -#define REGISTER_SUPER_INTERVAL_MIN 20 /* sec */ +#define REGISTER_SUPER_INTERVAL_MIN 5 /* sec */ #define REGISTER_SUPER_INTERVAL_MAX 3600 /* sec */ #define IFACE_UPDATE_INTERVAL (30) /* sec. How long it usually takes to get an IP lease. */ diff --git a/sn.c b/sn.c index f4fc1aa..906c45a 100644 --- a/sn.c +++ b/sn.c @@ -112,7 +112,8 @@ static void deinit_sn(n2n_sn_t * sss) * should not allow registrations to continue beyond the shutdown point. */ static uint16_t reg_lifetime(n2n_sn_t * sss) { - return 120; + /* NOTE: UDP firewalls usually have a 30 seconds timeout */ + return 15; }