From 922260896228a8f7e6dc6f9e81358c3db603097c Mon Sep 17 00:00:00 2001 From: Matthieu Grieger Date: Sun, 21 Aug 2016 17:58:11 -0700 Subject: [PATCH] Fixed https://github.com/matthieugrieger/mumbledj/issues/174: Fixed deadlock during track skip/finish --- CHANGELOG.md | 3 +++ bot/queue.go | 2 +- main.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9d1c4c..2466fc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ MumbleDJ Changelog ================== +### August 21, 2016 -- `v3.1.3` +* Fixed a deadlock that would occur during the transition from the first to second track in a queue. + ### August 14, 2016 -- `v3.1.2` * Fixed an index out of range crash in the queue skipping function. diff --git a/bot/queue.go b/bot/queue.go index a14b798..505c967 100644 --- a/bot/queue.go +++ b/bot/queue.go @@ -199,7 +199,7 @@ func (q *Queue) Skip() { q.mutex.Lock() // If caching is disabled, delete the track from disk. - if q.Length() != 0 && !viper.GetBool("cache.enabled") { + if len(q.Queue) != 0 && !viper.GetBool("cache.enabled") { DJ.YouTubeDL.Delete(q.Queue[0]) } diff --git a/main.go b/main.go index a55b2ab..c49dd63 100644 --- a/main.go +++ b/main.go @@ -32,7 +32,7 @@ func init() { services.DJ = DJ bot.DJ = DJ - DJ.Version = "v3.1.2" + DJ.Version = "v3.1.3" logrus.SetLevel(logrus.WarnLevel) }