dhtproxy: switch threading to io_context

This commit is contained in:
Seva committed 2019-05-27 15:06:11 -04:00
1 parent c40f35fa06
commit 3733fc2890
3 files changed
+71 -65

No files matched your search

+3
View File
@@ -620,6 +620,9 @@ DhtProxyServer::sendPushNotification(const std::string& token, Json::Value&& jso
http_parser parser;
auto hostAndPort = splitPort(pushServer_);
uint16_t port = std::atoi(hostAndPort.second.c_str());
// if other functions use the client move into private member to share the same
//auto io_context = std::make_shared<restinio::asio_ns::io_context>();
//std::thread([io_context](){io_context->run();});
restinio::client::do_request(request, hostAndPort.first, port, parser, settings);
}