Skip to content

Commit

Permalink
GinkgorRecover
Browse files Browse the repository at this point in the history
  • Loading branch information
fakelag committed Feb 25, 2024
1 parent ac72704 commit adf87f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions discordplayer/voiceworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/fakelag/streaming-music-bot/entities"

"github.com/fakelag/dca"
. "github.com/onsi/ginkgo/v2"
)

type DcaMediaSession struct {
Expand Down Expand Up @@ -366,6 +367,8 @@ func (dms *DiscordMusicSession) hasNonBotMembersInVoiceChannel(voiceChannelID st
}

func (dms *DiscordMusicSession) disconnectAndExitWorker() {
defer GinkgoRecover()

dms.mutex.Lock()
defer dms.mutex.Unlock()

Expand Down Expand Up @@ -408,6 +411,7 @@ func (dms *DiscordMusicSession) cleanupEncodingAndVoiceSession(
encodingSession *dca.EncodeSession,
voiceConnection discordinterface.DiscordVoiceConnection,
) {
defer GinkgoRecover()

if encodingSession != nil {
encodingSession.Cleanup()
Expand Down

0 comments on commit adf87f4

Please sign in to comment.