From d002c56ffe9bac01dfb488e0953cf0b789e012fb Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 27 Feb 2024 07:06:15 -0500 Subject: [PATCH] fix: set no limit on message size --- bao/rust/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bao/rust/src/main.rs b/bao/rust/src/main.rs index ff77493..4af6543 100644 --- a/bao/rust/src/main.rs +++ b/bao/rust/src/main.rs @@ -188,9 +188,13 @@ async fn main() -> Result<(), Box> { let _ = tx.send(()); }); + let server = bao_server::BaoServer::new(BaoService::new(global_state.clone())) + .max_decoding_message_size(usize::MAX) + .max_encoding_message_size(usize::MAX); + Server::builder() .max_frame_size((1 << 24) - 1) - .add_service(bao_server::BaoServer::new(BaoService::new(global_state.clone()))) + .add_service(server) .add_service(health_reporter.1) .serve_with_shutdown(addr, async { // This future completes when the shutdown signal is received,