Fixed https://github.com/matthieugrieger/mumbledj/issues/174: Fixed deadlock during track skip/finish

This commit is contained in:
Matthieu Grieger 2016-08-21 17:58:11 -07:00
parent 466e9189c6
commit 9222608962
3 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,9 @@
MumbleDJ Changelog 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` ### August 14, 2016 -- `v3.1.2`
* Fixed an index out of range crash in the queue skipping function. * Fixed an index out of range crash in the queue skipping function.

View file

@ -199,7 +199,7 @@ func (q *Queue) Skip() {
q.mutex.Lock() q.mutex.Lock()
// If caching is disabled, delete the track from disk. // 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]) DJ.YouTubeDL.Delete(q.Queue[0])
} }

View file

@ -32,7 +32,7 @@ func init() {
services.DJ = DJ services.DJ = DJ
bot.DJ = DJ bot.DJ = DJ
DJ.Version = "v3.1.2" DJ.Version = "v3.1.3"
logrus.SetLevel(logrus.WarnLevel) logrus.SetLevel(logrus.WarnLevel)
} }