import: Don't deadlock state receiver

This commit is contained in:
Elias Projahn 2021-04-09 13:01:47 +02:00
parent 2d5ce29aae
commit 8a00e4588c
3 changed files with 7 additions and 8 deletions

View file

@ -6,7 +6,6 @@ use gstreamer::tags::{Duration, TrackNumber};
use log::info;
use sha2::{Sha256, Digest};
use std::path::PathBuf;
use std::sync::Mutex;
use tokio::sync::watch;
/// Create a new import session for the default disc drive.
@ -150,7 +149,7 @@ pub(super) fn new() -> Result<ImportSession> {
tracks,
copy: Some(Box::new(copy)),
state_sender,
state_receiver: Mutex::new(state_receiver),
state_receiver,
};
Ok(session)