Skip to content

Commit

Permalink
changed trickle ice logging
Browse files Browse the repository at this point in the history
  • Loading branch information
brzep committed Nov 7, 2024
1 parent e286d6d commit 4bb1d74
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crossbeam_channel::Sender;
use super::WhipError;
use reqwest::{header::HeaderMap, Client, Method, StatusCode, Url};
use std::sync::{atomic::AtomicBool, Arc};
use tracing::{debug, error, info};
use tracing::{debug, error, info, warn};
use webrtc::{
ice_transport::{ice_candidate::RTCIceCandidate, ice_connection_state::RTCIceConnectionState},
peer_connection::{sdp::session_description::RTCSessionDescription, RTCPeerConnection},
Expand Down Expand Up @@ -194,7 +194,12 @@ async fn handle_candidate(
.text()
.await
.map_err(|e| WhipError::BodyParsingError("Trickle ICE patch".to_string(), e))?;
return Err(WhipError::BadStatus(status, body_str));
};
if status == StatusCode::UNPROCESSABLE_ENTITY || status == StatusCode::METHOD_NOT_ALLOWED {
warn!("Error while sending Ice Candidate do WHIP Server (Trickle ICE is probably not supported):\nStaus code: {status}\nBody: {body_str}")
} else {
return Err(WhipError::BadStatus(status, body_str));
}
}

Ok(())
}

0 comments on commit 4bb1d74

Please sign in to comment.