Skip to content

Commit

Permalink
fix: increase max codec frame length
Browse files Browse the repository at this point in the history
  • Loading branch information
XOR-op committed Nov 6, 2023
1 parent c024191 commit f3ae670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions boltapi/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use crate::{
TunStatusSchema,
};

pub const MAX_CODEC_FRAME_LENGTH: usize = 512 * 1024 * 1024;

#[tarpc::service]
pub trait ControlService {
// Proxies
Expand Down
3 changes: 2 additions & 1 deletion boltconn/src/external/uds_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ impl UdsController {
}

pub async fn run(self, listener: Arc<UnixListenerGuard>) -> io::Result<()> {
let codec_builder = LengthDelimitedCodec::builder();
let mut codec_builder = LengthDelimitedCodec::builder();
codec_builder.max_frame_length(boltapi::rpc::MAX_CODEC_FRAME_LENGTH);
loop {
let (conn, _addr) = listener.get_listener().accept().await?;
let framed = codec_builder.new_framed(conn);
Expand Down

0 comments on commit f3ae670

Please sign in to comment.