Skip to content

Commit 9bc266e

Browse files
committed
Change to lambda expression
1 parent 9145c24 commit 9bc266e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Release/src/http/listener/http_server_asio.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,17 @@ void connection::start_request_response()
205205

206206
if (m_ssl_stream)
207207
{
208-
boost::asio::async_read_until(*m_ssl_stream, m_request_buf, CRLF, boost::bind(&connection::handle_http_line, this, placeholders::error));
208+
boost::asio::async_read_until(*m_ssl_stream, m_request_buf, CRLF, [this](const boost::system::error_code& ec, std::size_t)
209+
{
210+
this->handle_http_line(ec);
211+
});
209212
}
210213
else
211214
{
212-
boost::asio::async_read_until(*m_socket, m_request_buf, crlf_nonascii_searcher, boost::bind(&connection::handle_http_line, this, placeholders::error));
215+
boost::asio::async_read_until(*m_socket, m_request_buf, crlf_nonascii_searcher, [this](const boost::system::error_code& ec, std::size_t)
216+
{
217+
this->handle_http_line(ec);
218+
});
213219
}
214220
}
215221

0 commit comments

Comments
 (0)