From 9b3152cb3645913d8f2e419575d9d8b5d0ad0d68 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 29 Sep 2009 18:09:03 +0200 Subject: Connection: Fixed a bug causing big packets not to be received. --- src/Net/Connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Net') 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 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)); -- cgit v1.2.3