From 030fed6d12c324a2c1338322ce65575913b6ebc4 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 13 Mar 2018 04:57:11 +0200 Subject: [PATCH] EpisodeWidget: Just in case there was a deadlock. --- hammond-gtk/src/widgets/episode.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hammond-gtk/src/widgets/episode.rs b/hammond-gtk/src/widgets/episode.rs index a1186c5..3ce2b0c 100644 --- a/hammond-gtk/src/widgets/episode.rs +++ b/hammond-gtk/src/widgets/episode.rs @@ -175,8 +175,10 @@ impl EpisodeWidget { }); // Show or hide the play/delete/download buttons upon widget initialization. - // FIXME: There might be a deadlock introduced here, but I am too tired to test it. if let Some(prog) = active_dl { + lock.cancel_connect_clicked(prog.clone()); + drop(lock); + // Setup a callback that will update the progress bar. update_progressbar_callback(prog.clone(), self.media.clone(), id); @@ -184,8 +186,6 @@ impl EpisodeWidget { // with the http ContentLength header number rather than // relying to the RSS feed. update_total_size_callback(prog.clone(), self.media.clone()); - - lock.cancel_connect_clicked(prog); } Ok(())