diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 0f499b05..09403315 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -430,6 +430,15 @@ DhtProxyServer::subscribe(const std::shared_ptr& session) scheduler_.edit(listener.expireNotifyJob, timeout - proxy::OP_MARGIN); s->close(restbed::OK, "{}\n"); schedulerCv_.notify_one(); + dht_->get(infoHash, + [this, infoHash, pushToken, isAndroid, clientId](std::vector> /*value*/) { + // Build message content. + Json::Value json; + json["key"] = infoHash.toString(); + json["to"] = clientId; + sendPushNotification(pushToken, json, isAndroid); + return true; + }, [](bool /*ok* */) {}); return; } }