diff --git a/src/main.rs b/src/main.rs index b6cca64..702ba79 100644 --- a/src/main.rs +++ b/src/main.rs @@ -168,13 +168,17 @@ async fn handle_connection( // .do_operation(update.number.construct_op(ChannelOperationKind::Data(data))); // arbitrary limit - if total_sent_data.len() < 500_000 { + if total_sent_data.len() < 50_000 { total_sent_data.extend_from_slice(&data); } else { info!(channel = %update.number, "Reached stdin limit"); - state.do_operation(update.number.construct_op(ChannelOperationKind::Data(b"Thanks Hayley!".to_vec()))); + state.do_operation( + update.number.construct_op(ChannelOperationKind::Data( + b"Thanks Hayley!".to_vec(), + )), + ); state.do_operation(update.number.construct_op(ChannelOperationKind::Close)); - } + } if is_eof { debug!(channel = %update.number, "Received EOF, closing channel");