Commit 3757ea46 authored by Aria Thuy Dung Bui's avatar Aria Thuy Dung Bui

add Try-Catch

parent c0bfd99e
Pipeline #46702 failed with stages
in 17 seconds
......@@ -739,9 +739,14 @@ namespace SimpleWeb {
return;
}
}
if(std::stof(response->session->request->http_version) >= 1.1) {
auto new_session = std::make_shared<Session>(this->config.max_request_streambuf_size, response->session->connection);
this->read(new_session);
try {
if(std::stof(response->session->request->http_version) >= 1.1) {
auto new_session = std::make_shared<Session>(this->config.max_request_streambuf_size, response->session->connection);
this->read(new_session);
return;
}
}
catch(const std::exception &e) {
return;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment