summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-18 19:01:13 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:48:44 +0200
commit8fa2479f8f1bc518727f7055be6549d5f1139bb6 (patch)
treed2dd10f95536ae2052477e5eb317f770f3924535
parent16cc92dab608a3c83d9c1baa4dbdca307da12c9c (diff)
increase timeout for redirections
available redirections expire after 5 minutes.
-rw-r--r--src/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index bda0eb9..896ba59 100644
--- a/src/core.c
+++ b/src/core.c
@@ -213,6 +213,8 @@ static void tip_client_redirect_timer_cb(struct ev_loop *loop, ev_timer *timer,
free(redir);
}
+#define TIP_CLIENT_REDIRECT_TIMEOUT 300.
+
int tip_client_redirect_create(const struct tip_client *cli)
{
struct tip_client_redirect *redir;
@@ -246,7 +248,7 @@ int tip_client_redirect_create(const struct tip_client *cli)
redir->users = max_clients;
list_add_tail(&redir->list, &client_redirect_list);
- ev_timer_init(&redir->timer, tip_client_redirect_timer_cb, 60, 0.);
+ ev_timer_init(&redir->timer, tip_client_redirect_timer_cb, TIP_CLIENT_REDIRECT_TIMEOUT, 0.);
ev_timer_start(tip_main_loop, &redir->timer);
syslog(LOG_INFO, "adding client redirection to %s:%hu for %s",