diff --git a/aquatic_ws_protocol/src/lib.rs b/aquatic_ws_protocol/src/lib.rs index 008be43..40d4d16 100644 --- a/aquatic_ws_protocol/src/lib.rs +++ b/aquatic_ws_protocol/src/lib.rs @@ -304,6 +304,8 @@ impl OutMessage { _ => return Err(anyhow::anyhow!("Message is neither text nor bytes")), }; + // This is brittle and could fail, but it doesn't matter too much + // since this function is only used in load tester if text.contains("answer"){ Ok(Self::Answer(::serde_json::from_str(&text)?)) } else if text.contains("offer"){