added debug call
This commit is contained in:
parent
7a438997ad
commit
9bb48e1b21
1 changed files with 4 additions and 3 deletions
|
@ -12,8 +12,7 @@ use tokio::{
|
||||||
};
|
};
|
||||||
use tokio_tungstenite::{connect_async, tungstenite::Message, MaybeTlsStream, WebSocketStream};
|
use tokio_tungstenite::{connect_async, tungstenite::Message, MaybeTlsStream, WebSocketStream};
|
||||||
use tokio_tungstenite::tungstenite::error::Error as tungstenite_error;
|
use tokio_tungstenite::tungstenite::error::Error as tungstenite_error;
|
||||||
use tracing::field::debug;
|
use tracing::{error, info, debug, instrument};
|
||||||
use tracing::{error, info, instrument};
|
|
||||||
use webrtc::peer_connection::sdp::session_description::RTCSessionDescription;
|
use webrtc::peer_connection::sdp::session_description::RTCSessionDescription;
|
||||||
|
|
||||||
static MAX_MESSAGE: usize = 50;
|
static MAX_MESSAGE: usize = 50;
|
||||||
|
@ -38,6 +37,8 @@ pub async fn connect_to_server(
|
||||||
result_oneshot: oneshot::Sender<Result<(AppSender, AppReceiver), tungstenite_error>>
|
result_oneshot: oneshot::Sender<Result<(AppSender, AppReceiver), tungstenite_error>>
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
debug!("Connecting to parent!");
|
||||||
|
|
||||||
match connect_async(connection_string).await {
|
match connect_async(connection_string).await {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
if let Err(e) = result_oneshot.send(Err(e)) {
|
if let Err(e) = result_oneshot.send(Err(e)) {
|
||||||
|
@ -144,7 +145,7 @@ pub async fn listen_to_ws_task(
|
||||||
info!("Received a Frame websocket message?");
|
info!("Received a Frame websocket message?");
|
||||||
}
|
}
|
||||||
Message::Text(text) => {
|
Message::Text(text) => {
|
||||||
debug("Recieved text from websocket: {text}");
|
debug!("Recieved text from websocket: {text}");
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
{
|
{
|
||||||
match serde_json::from_str(&text) {
|
match serde_json::from_str(&text) {
|
||||||
|
|
Loading…
Reference in a new issue