Skip to content

Commit

Permalink
Fix building with newest Boost.Asio (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
diath committed Nov 25, 2022
1 parent fc39ee4 commit 77c844d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/framework/net/connection.cpp
Expand Up @@ -162,7 +162,7 @@ void Connection::read(uint16 bytes, const RecvCallback& callback)
m_recvCallback = callback;

asio::async_read(m_socket,
asio::buffer(m_inputStream.prepare(bytes)),
asio::mutable_buffer(m_inputStream.prepare(bytes)),
std::bind(&Connection::onRecv, asConnection(), std::placeholders::_1, std::placeholders::_2));

m_readTimer.cancel();
Expand Down Expand Up @@ -194,7 +194,7 @@ void Connection::read_some(const RecvCallback& callback)

m_recvCallback = callback;

m_socket.async_read_some(asio::buffer(m_inputStream.prepare(RECV_BUFFER_SIZE)),
m_socket.async_read_some(asio::mutable_buffer(m_inputStream.prepare(RECV_BUFFER_SIZE)),
std::bind(&Connection::onRecv, asConnection(), std::placeholders::_1, std::placeholders::_2));

m_readTimer.cancel();
Expand Down

0 comments on commit 77c844d

Please sign in to comment.