Skip to content

Commit

Permalink
signal_stream: ignore unknown messagess (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Jul 13, 2024
1 parent 4865f37 commit 9119643
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions livekit-api/src/signal_client/signal_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ impl SignalStream {
let res = proto::SignalResponse::decode(data.as_slice())
.expect("failed to decode SignalResponse");

let msg = res.message.unwrap();
let _ = emitter.send(Box::new(msg));
if let Some(msg) = res.message {
let _ = emitter.send(Box::new(msg));
}
}
Ok(Message::Ping(data)) => {
let _ = internal_tx.send(InternalMessage::Pong { ping_data: data }).await;
Expand Down

0 comments on commit 9119643

Please sign in to comment.