Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Nov 16, 2023
1 parent 364ba1a commit e814ff8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions livekit-ffi/src/server/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Log for FfiLogger {
return self.env_logger.flush();
}

let (tx, mut rx) = oneshot::channel();
let (tx, rx) = oneshot::channel();
self.log_tx.send(LogMsg::Flush(tx)).unwrap();
let _ = self.server.async_runtime.block_on(rx); // should we block?
}
Expand All @@ -97,8 +97,12 @@ async fn log_forward_task(server: &'static FfiServer, mut rx: mpsc::UnboundedRec

loop {
tokio::select! {
Some(msg) = rx.recv() => {
match msg {
msg = rx.recv() => {
if msg.is_none() {
break;
}

match msg.unwrap() {
LogMsg::Log(record) => {
batch.push(record);
}
Expand Down
4 changes: 2 additions & 2 deletions livekit-ffi/src/server/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

use super::room::{FfiParticipant, FfiPublication, FfiTrack};
use super::{
audio_source, audio_stream, logger::FfiLogger, room, video_source, video_stream, FfiConfig,
FfiError, FfiResult, FfiServer,
audio_source, audio_stream, room, video_source, video_stream, FfiConfig, FfiError, FfiResult,
FfiServer,
};
use crate::proto;
use livekit::prelude::*;
Expand Down

0 comments on commit e814ff8

Please sign in to comment.