summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Net/Connection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp
index 256bbfe..f66a3df 100644
--- a/src/Net/Connection.cpp
+++ b/src/Net/Connection.cpp
@@ -167,7 +167,7 @@ void Connection::rawReceive(std::size_t length, const boost::function1<void, con
receiving = true;
if(length > received) {
- boost::asio::async_read(socket, boost::asio::buffer(receiveBuffer->data()+received, receiveBuffer->size()-received), boost::asio::transfer_at_least(length),
+ boost::asio::async_read(socket, boost::asio::buffer(receiveBuffer->data()+received, receiveBuffer->size()-received), boost::asio::transfer_at_least(length-received),
boost::bind(&Connection::handleRead, thisPtr.lock(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred,
length, notify));