Fix https://github.com/matthieugrieger/mumbledj/issues/161: Queue is now reset after disconnect
This commit is contained in:
parent
89def4c197
commit
cb1bc84323
|
@ -1,6 +1,9 @@
|
||||||
MumbleDJ Changelog
|
MumbleDJ Changelog
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
### June 28, 2016 -- `v3.0.9`
|
||||||
|
* Queue is now reset after disconnecting from the server to avoid unpredictable behavior.
|
||||||
|
|
||||||
### June 26, 2016 -- `v3.0.8`
|
### June 26, 2016 -- `v3.0.8`
|
||||||
* Fixed hang on setting `max_tracks_per_playlist` to a value larger than 50 (thanks [@mattikus](https://github.com/mattikus)).
|
* Fixed hang on setting `max_tracks_per_playlist` to a value larger than 50 (thanks [@mattikus](https://github.com/mattikus)).
|
||||||
* Fixed full directory path not being created properly for config file (thanks [@DanielMarquard](https://github.com/DanielMarquard)).
|
* Fixed full directory path not being created properly for config file (thanks [@DanielMarquard](https://github.com/DanielMarquard)).
|
||||||
|
|
|
@ -80,6 +80,7 @@ func (dj *MumbleDJ) OnConnect(e *gumble.ConnectEvent) {
|
||||||
// OnDisconnect event. Terminates MumbleDJ process or retries connection if
|
// OnDisconnect event. Terminates MumbleDJ process or retries connection if
|
||||||
// automatic connection retries are enabled.
|
// automatic connection retries are enabled.
|
||||||
func (dj *MumbleDJ) OnDisconnect(e *gumble.DisconnectEvent) {
|
func (dj *MumbleDJ) OnDisconnect(e *gumble.DisconnectEvent) {
|
||||||
|
dj.Queue.Reset()
|
||||||
if viper.GetBool("connection.retry_enabled") &&
|
if viper.GetBool("connection.retry_enabled") &&
|
||||||
(e.Type == gumble.DisconnectError || e.Type == gumble.DisconnectKicked) {
|
(e.Type == gumble.DisconnectError || e.Type == gumble.DisconnectKicked) {
|
||||||
logrus.WithFields(logrus.Fields{
|
logrus.WithFields(logrus.Fields{
|
||||||
|
|
Reference in a new issue