Fix wrong reconnect timing
This commit is contained in:
@@ -369,8 +369,6 @@ impl EngineInner {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.reconnect_interval.lock().tick().await;
|
|
||||||
|
|
||||||
if self.full_reconnect.load(Ordering::SeqCst) {
|
if self.full_reconnect.load(Ordering::SeqCst) {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
let _ = self.engine_emitter.send(EngineEvent::Restarting).await;
|
let _ = self.engine_emitter.send(EngineEvent::Restarting).await;
|
||||||
@@ -399,6 +397,8 @@ impl EngineInner {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.reconnect_interval.lock().tick().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(EngineError::Connection("failed to reconnect".to_owned()))
|
Err(EngineError::Connection("failed to reconnect".to_owned()))
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ fn macos_link_search_path() -> Option<String> {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// TODO Download precompiled binaries of WebRTC for the target_os
|
// TODO Download precompiled binaries of WebRTC for the target_os
|
||||||
let target_os = "macos";
|
let target_os = "windows";
|
||||||
//let target_arch = "arm64";
|
//let target_arch = "arm64";
|
||||||
|
|
||||||
let libwebrtc_dir = path::PathBuf::from("libwebrtc/src");
|
let libwebrtc_dir = path::PathBuf::from("libwebrtc/src");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
namespace livekit {
|
namespace livekit {
|
||||||
RTCRuntime::RTCRuntime() {
|
RTCRuntime::RTCRuntime() {
|
||||||
rtc::LogMessage::LogToDebug(rtc::LS_INFO);
|
// rtc::LogMessage::LogToDebug(rtc::LS_INFO);
|
||||||
RTC_LOG(LS_INFO) << "RTCRuntime()";
|
RTC_LOG(LS_INFO) << "RTCRuntime()";
|
||||||
RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()";
|
RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user