diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 4bbfff25a6cabf6575a38c623784899dfada45f4..3fe2aae45f7f8229b4f6e1185e1234c1722e3f98 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -1018,7 +1018,7 @@ DhtProxyServer::sendPushNotification(const std::string& token, Json::Value&& jso unsigned reqid = 0; try { auto request = std::make_shared<http::Request>(io_context(), pushHostPort_.first, pushHostPort_.second, - httpsServer_ ? true : false, logger_); + pushHostPort_.first.find("https://") == 0, logger_); reqid = request->id(); request->set_target("/api/push"); request->set_method(restinio::http_method_post()); @@ -1078,7 +1078,7 @@ DhtProxyServer::sendPushNotification(const std::string& token, Json::Value&& jso } catch (const std::exception &e){ if (logger_) - logger_->e("[proxy:server] [notification] error send push: %i", e.what()); + logger_->e("[proxy:server] [notification] error send push: %s", e.what()); if (reqid) { std::lock_guard<std::mutex> l(requestLock_); requests_.erase(reqid);