Detach tone-test savers on reconnect
This commit is contained in:
committed by
Brandon McGinty
parent
b23afebdb3
commit
bad4e8172a
@@ -68,7 +68,7 @@ func (b *Barnard) connect(reconnect bool) bool {
|
||||
return false
|
||||
}
|
||||
b.toneTestSaver = saver
|
||||
b.Client.Config.AttachAudio(saver)
|
||||
b.toneTestSaverDetach = b.Client.Config.AttachAudio(saver)
|
||||
|
||||
b.Connected = true
|
||||
if b.toneTestAutoTransmit() {
|
||||
@@ -191,10 +191,7 @@ func (b *Barnard) OnDisconnect(e *gumble.DisconnectEvent) {
|
||||
close(b.toneTestStop)
|
||||
b.toneTestStop = nil
|
||||
}
|
||||
if b.toneTestSaver != nil {
|
||||
b.toneTestSaver.Stop()
|
||||
b.toneTestSaver = nil
|
||||
}
|
||||
b.cleanupToneTestAudio()
|
||||
}
|
||||
|
||||
b.Notify("disconnect", "me", reason)
|
||||
|
||||
Reference in New Issue
Block a user