mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
proxy server: fix warning when building without push notifications
This commit is contained in:
1 parent
7f48c4808b
commit
0692bd9bc9
1 file changed
+1
-1
@@ -669,7 +669,6 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session)
|
||||
clientId = pVal["client_id"].asString();
|
||||
platform = pVal["platform"].asString();
|
||||
}
|
||||
bool isAndroid = platform == "android";
|
||||
std::unique_lock<std::mutex> lock(schedulerLock_);
|
||||
scheduler_.syncTime();
|
||||
auto timeout = scheduler_.time() + proxy::OP_TIMEOUT;
|
||||
@@ -684,6 +683,7 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& 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]
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user