delete unnecessary
This commit is contained in:
parent
0ad4fb1e5a
commit
16ca6ebf08
@ -18,7 +18,7 @@ void ServeHttp(net::io_context& ioc,
|
||||
const tcp::endpoint& endpoint,
|
||||
RequestHandler&& handler)
|
||||
{
|
||||
using MyListener = Listener<std::decay_t < RequestHandler>>;
|
||||
using MyListener = Listener<std::decay_t<RequestHandler>>;
|
||||
|
||||
std::make_shared<MyListener>(ioc,
|
||||
endpoint,
|
||||
|
@ -45,8 +45,8 @@ class SessionBase
|
||||
void Write(http::response<Body, Fields>&& response)
|
||||
{
|
||||
// Запись выполняется асинхронно, поэтому response перемещаем в область кучи
|
||||
auto safe_response = std::make_shared < http::response
|
||||
< Body, Fields>>(std::move(response));
|
||||
auto safe_response = std::make_shared<http::response
|
||||
<Body, Fields>>(std::move(response));
|
||||
|
||||
auto self = GetSharedThis();
|
||||
http::async_write(stream_, *safe_response,
|
||||
@ -60,9 +60,9 @@ class SessionBase
|
||||
}
|
||||
|
||||
private:
|
||||
beast::tcp_stream stream_;
|
||||
beast::tcp_stream stream_;
|
||||
beast::flat_buffer buffer_;
|
||||
HttpRequest request_;
|
||||
HttpRequest request_;
|
||||
|
||||
void OnRead(beast::error_code ec, [[maybe_unused]] size_t bytes_read);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user