From 6ebad4bb41f6d591213ed54863706d4c0d179838 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Wed, 29 May 2019 14:51:09 -0700 Subject: [PATCH] increase write buffer size to 16kb --- src/codec/framed_write.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/codec/framed_write.rs b/src/codec/framed_write.rs index 87ebc67..c60b2c1 100644 --- a/src/codec/framed_write.rs +++ b/src/codec/framed_write.rs @@ -39,7 +39,10 @@ enum Next { } /// Initialze the connection with this amount of write buffer. -const DEFAULT_BUFFER_CAPACITY: usize = 4 * 1_024; +/// +/// The minimum MAX_FRAME_SIZE is 16kb, so always be able to send a HEADERS +/// frame that big. +const DEFAULT_BUFFER_CAPACITY: usize = 16 * 1_024; /// Min buffer required to attempt to write a frame const MIN_BUFFER_CAPACITY: usize = frame::HEADER_LEN + CHAIN_THRESHOLD;