eidheim / Simple-Web-Server

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
MIT License
2.61k stars 751 forks source link

Fully loads one kernel #205

Closed FarafontovDmitriy closed 6 years ago

FarafontovDmitriy commented 6 years ago

I use asio standalone. The following code fully loads one kernel my CPU. This happens after the GET request comes. `HttpServer server;

server.config.port = 80;

server.default_resource["GET"] = [hModule](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) {
    string strRequest = request->content.string();
    p7Trace->P7_INFO(hModule, TM("%ls"), W_C_STR(strRequest));
    *response << *driversManager.GetResponse(strRequest).get();
};

server.start();`

This only happens when using the latest version asio (from https://github.com/chriskohlhoff/asio).

FarafontovDmitriy commented 6 years ago

Issue can be closed. The problem was created by the P7 logging library

eidheim commented 6 years ago

Glad you figured it out