From 3463196f9ce2959f20914d36859bbd7369f5e4f2 Mon Sep 17 00:00:00 2001 From: John Jones Date: Mon, 24 Apr 2017 16:33:23 -0500 Subject: [PATCH] Increased max size of buffer for received data Note: this number should be made to be dynamic --- net/multistream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/multistream.c b/net/multistream.c index 9bf23c8..feb0398 100644 --- a/net/multistream.c +++ b/net/multistream.c @@ -62,7 +62,8 @@ int libp2p_net_multistream_read(void* stream_context, unsigned char** results, s struct SessionContext* session_context = (struct SessionContext*)stream_context; struct Stream* stream = session_context->insecure_stream; int bytes = 0; - size_t buffer_size = 65535; + // TODO: this is arbitrary, and should be dynamic + size_t buffer_size = 362144; char buffer[buffer_size]; char* pos = buffer; size_t num_bytes_requested = 0, left = 0, already_read = 0;