summaryrefslogtreecommitdiffstats
path: root/src/Net
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-29 18:09:03 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-29 18:09:03 +0200
commit9b3152cb3645913d8f2e419575d9d8b5d0ad0d68 (patch)
treedac2fe20bfdc82d8e0cbbe98685d1b587eb90492 /src/Net
parentd972b9219571289097de375210fec5d6d9d16902 (diff)
downloadmad-9b3152cb3645913d8f2e419575d9d8b5d0ad0d68.tar
mad-9b3152cb3645913d8f2e419575d9d8b5d0ad0d68.zip
Connection: Fixed a bug causing big packets not to be received.
Diffstat (limited to 'src/Net')
-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));