aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index a777293a3..69c91bc30 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -665,14 +665,13 @@ void Client::ReceiveAll()
void Client::Receive()
{
DSTACK(__FUNCTION_NAME);
- u32 data_maxsize = 200000;
- Buffer<u8> data(data_maxsize);
+ SharedBuffer<u8> data;
u16 sender_peer_id;
u32 datasize;
{
//TimeTaker t1("con mutex and receive", m_device);
//JMutexAutoLock lock(m_con_mutex); //bulk comment-out
- datasize = m_con.Receive(sender_peer_id, *data, data_maxsize);
+ datasize = m_con.Receive(sender_peer_id, data);
}
//TimeTaker t1("ProcessData", m_device);
ProcessData(*data, datasize, sender_peer_id);