diff --git a/TODO.md b/TODO.md index 25fd375..a8b0ac9 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,9 @@ * aquatic_http * aquatic_ws, including sending back new error responses +* aquatic_ws: should it send back error on message parse error, or does that + just indicate that not enough data has been received yet? + * Consider turning on safety and override flags in mimalloc, mostly for simd-json. It might be faster to just stop using simd-json if I consider it insecure, which it maybe isn't. diff --git a/aquatic_ws/src/lib/network/mod.rs b/aquatic_ws/src/lib/network/mod.rs index 75780b0..f12859d 100644 --- a/aquatic_ws/src/lib/network/mod.rs +++ b/aquatic_ws/src/lib/network/mod.rs @@ -237,7 +237,9 @@ pub fn run_handshakes_and_read_messages( error!("InMessageSender: couldn't send message: {:?}", err); } } - Err(err) => { + Err(_) => { + // FIXME: maybe this condition just occurs when enough data hasn't been recevied? + /* info!("error parsing message: {:?}", err); let out_message = OutMessage::ErrorResponse(ErrorResponse { @@ -247,6 +249,7 @@ pub fn run_handshakes_and_read_messages( }); local_responses.push((meta, out_message)); + */ } } }