diff --git a/tokio-util/src/codec/framed.rs b/tokio-util/src/codec/framed.rs index 09a5b30b9..da3fec88e 100644 --- a/tokio-util/src/codec/framed.rs +++ b/tokio-util/src/codec/framed.rs @@ -119,7 +119,10 @@ where buffer: BytesMut::with_capacity(capacity), has_errored: false, }, - write: WriteFrame::default(), + write: WriteFrame { + buffer: BytesMut::with_capacity(capacity), + backpressure_boundary: capacity, + }, }, }, }