mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-06 19:45:25 +01:00
example-service: set max frame length to usize::MAX
I don't know what the intention was behind using u32::MAX + 1 but since the argument's type is usize this is the only giant value that makes sense to me.
This commit is contained in:
@@ -58,7 +58,7 @@ async fn main() -> io::Result<()> {
|
||||
// JSON transport is provided by the json_transport tarpc module. It makes it easy
|
||||
// to start up a serde-powered json serialization strategy over TCP.
|
||||
let mut listener = tarpc::serde_transport::tcp::listen(&server_addr, Json::default).await?;
|
||||
listener.config_mut().max_frame_length(4294967296);
|
||||
listener.config_mut().max_frame_length(usize::MAX);
|
||||
listener
|
||||
// Ignore accept errors.
|
||||
.filter_map(|r| future::ready(r.ok()))
|
||||
|
||||
Reference in New Issue
Block a user