From 768743a20035fb6620292f60b78c937106a36efc Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 17 Jun 2021 22:02:42 +0200 Subject: [PATCH] fix deadlock --- manager/ytsync.go | 1 - sources/youtubeVideo.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manager/ytsync.go b/manager/ytsync.go index 33bd1a3..5a2460c 100644 --- a/manager/ytsync.go +++ b/manager/ytsync.go @@ -132,7 +132,6 @@ func (s *Sync) FullCycle() (e error) { log.Println("Got interrupt signal, shutting down (if publishing, will shut down after current publish)") s.grp.Stop() time.Sleep(5 * time.Second) - debug.PrintStack() // so we can figure out what's not stopping }() err := s.setStatusSyncing() if err != nil { diff --git a/sources/youtubeVideo.go b/sources/youtubeVideo.go index 2bf95c4..edfb8b0 100644 --- a/sources/youtubeVideo.go +++ b/sources/youtubeVideo.go @@ -339,7 +339,7 @@ func (v *YoutubeVideo) download() error { return errors.Err(err) } ticker := time.NewTicker(400 * time.Millisecond) - done := make(chan bool) + done := make(chan bool, 1) v.progressBarWg.Add(1) go func() { defer v.progressBarWg.Done()