diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 90fb18cb..744ba986 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -669,7 +669,6 @@ DhtProxyServer::put(const std::shared_ptr& session) clientId = pVal["client_id"].asString(); platform = pVal["platform"].asString(); } - bool isAndroid = platform == "android"; std::unique_lock lock(schedulerLock_); scheduler_.syncTime(); auto timeout = scheduler_.time() + proxy::OP_TIMEOUT; @@ -684,6 +683,7 @@ DhtProxyServer::put(const std::shared_ptr& session) }); #ifdef OPENDHT_PUSH_NOTIFICATIONS if (not pushToken.empty()) { + bool isAndroid = platform == "android"; pput.expireNotifyJob = scheduler_.add(timeout - proxy::OP_MARGIN, [this, infoHash, vid, pushToken, clientId, isAndroid] {