Skip to content

Commit

Permalink
treat all signal messages as ping response (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Nov 14, 2023
1 parent 21e2367 commit 4a0d511
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion livekit-api/src/signal_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,12 @@ async fn signal_task(
.as_millis() as i64;

rtt = now - pong.last_ping_timestamp;
ping_timeout.as_mut().reset(Instant::now() + timeout_duration);
}
_ => {}
}

ping_timeout.as_mut().reset(Instant::now() + timeout_duration);

let _ = emitter.send(SignalEvent::Message(signal));
} else {
let _ = emitter.send(SignalEvent::Close("stream closed".into()));
Expand Down

0 comments on commit 4a0d511

Please sign in to comment.