From 04a78445c6f7a293039fd4bb8fa0510696caf729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Wed, 18 Aug 2021 16:32:33 -0400 Subject: [PATCH] dht_proxy_server: increase ttl for push to 24 hours If the android device is offline during more than 10 minutes, it can misses push notifications and cause an incorrect state with values not expired even if the re-subscribe is correct. --- src/dht_proxy_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 647901b6..7dabadf3 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -1004,7 +1004,7 @@ DhtProxyServer::sendPushNotification(const std::string& token, Json::Value&& jso notification["platform"] = type == PushType::Android ? 2 : 1; notification["data"] = std::move(json); notification["priority"] = highPriority ? "high" : "normal"; - notification["time_to_live"] = 600; + notification["time_to_live"] = 3600 * 24; // 24 hours Json::Value notifications(Json::arrayValue); notifications[0] = notification; -- GitLab