using json_value = boost::json::value;
using json_array = boost::json::array;
-const char *DaemonMetricCollector::SOCKETDIR = "/tmp/ceph-asok.u6a3XT";
+const char *DaemonMetricCollector::SOCKETDIR = "/var/run/ceph/";
void DaemonMetricCollector::request_loop(boost::asio::steady_timer &timer) {
timer.async_wait([&](const boost::system::error_code &e) {
// Asynchronously receive a complete request message.
void read_request() {
- // auto self = shared_from_this();
+ auto self = shared_from_this();
http::async_read(socket_, buffer_, request_,
- [&](beast::error_code ec, std::size_t bytes_transferred) {
+ [self](beast::error_code ec, std::size_t bytes_transferred) {
boost::ignore_unused(bytes_transferred);
if (!ec)
- process_request();
+ self->process_request();
});
}