Fix wrong reconnect timing

This commit is contained in:
Théo Monnom
2022-12-23 00:35:59 +01:00
parent 921f314f00
commit 0c9c186b33
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -369,8 +369,6 @@ impl EngineInner {
return Ok(());
}
self.reconnect_interval.lock().tick().await;
if self.full_reconnect.load(Ordering::SeqCst) {
if i == 0 {
let _ = self.engine_emitter.send(EngineEvent::Restarting).await;
@@ -399,6 +397,8 @@ impl EngineInner {
return Ok(());
}
}
self.reconnect_interval.lock().tick().await;
}
Err(EngineError::Connection("failed to reconnect".to_owned()))
+1 -1
View File
@@ -52,7 +52,7 @@ fn macos_link_search_path() -> Option<String> {
fn main() {
// TODO Download precompiled binaries of WebRTC for the target_os
let target_os = "macos";
let target_os = "windows";
//let target_arch = "arm64";
let libwebrtc_dir = path::PathBuf::from("libwebrtc/src");
@@ -8,7 +8,7 @@
namespace livekit {
RTCRuntime::RTCRuntime() {
rtc::LogMessage::LogToDebug(rtc::LS_INFO);
// rtc::LogMessage::LogToDebug(rtc::LS_INFO);
RTC_LOG(LS_INFO) << "RTCRuntime()";
RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()";