fix webrtc example when webrtc disabled
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ async fn main() -> Result<()> {
|
|||||||
// Wait for the answer to be pasted
|
// Wait for the answer to be pasted
|
||||||
println!(
|
println!(
|
||||||
"Start new terminal run: \n{} \ncopy remote endpoint and paste here",
|
"Start new terminal run: \n{} \ncopy remote endpoint and paste here",
|
||||||
format!("cargo r --example webrtc -- --offer {}", local_endpoint)
|
format!("cargo r --features webrtc --example webrtc -- --offer {}", local_endpoint)
|
||||||
);
|
);
|
||||||
// readline blocking
|
// readline blocking
|
||||||
let line = std::io::stdin()
|
let line = std::io::stdin()
|
||||||
|
|||||||
+1
-1
@@ -100,7 +100,7 @@ impl WebRTCStream {
|
|||||||
Self::get_remote_offer(remote_endpoint)?
|
Self::get_remote_offer(remote_endpoint)?
|
||||||
};
|
};
|
||||||
|
|
||||||
let key = remote_offer.clone();
|
let mut key = remote_offer.clone();
|
||||||
let mut lock = SESSIONS.lock().await;
|
let mut lock = SESSIONS.lock().await;
|
||||||
if let Some(cached_stream) = lock.get(&key) {
|
if let Some(cached_stream) = lock.get(&key) {
|
||||||
if !key.is_empty() {
|
if !key.is_empty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user