Skip to content

Commit

Permalink
Removed redundant std::ref causing problems with Boost 1.70 (fixes #3990
Browse files Browse the repository at this point in the history
)

The asio socket ctor already takes a reference.
  • Loading branch information
Vultraz committed Jul 14, 2019
1 parent bd130fc commit c10cdd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/server_base.cpp
Expand Up @@ -77,7 +77,7 @@ void server_base::start_server()

void server_base::serve(boost::asio::ip::tcp::acceptor& acceptor)
{
socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(io_service_);
acceptor.async_accept(*socket, [&acceptor, socket, this](const boost::system::error_code& error){
this->accept_connection(acceptor, error, socket);
});
Expand Down

0 comments on commit c10cdd3

Please sign in to comment.