Skip to content

Commit

Permalink
max_frame_size
Browse files Browse the repository at this point in the history
  • Loading branch information
noisyscanner committed Oct 22, 2024
1 parent 02c59b3 commit caf244d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions metrics/src/logreceiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ async fn receive_log(
) -> Result<HttpResponse, Error> {
let (res, mut session, stream) = actix_ws::handle(&req, stream)?;

let two_megs = 2 * 1024 * 1024;

let mut stream = stream
.max_frame_size(two_megs)
.aggregate_continuations()
// aggregate continuation frames up to 2MiB
.max_continuation_size(2_usize.pow(21));
// aggregate continuation frames up to 1MiB
.max_continuation_size(two_megs);

rt::spawn(async move {
while let Some(msg) = stream.next().await {
Expand Down

0 comments on commit caf244d

Please sign in to comment.