Added lots of temp logs into voice close func
This commit is contained in:
parent
af57bc1789
commit
3329f87b14
1 changed files with 7 additions and 0 deletions
7
voice.go
7
voice.go
|
@ -165,12 +165,16 @@ func (v *VoiceConnection) Close() {
|
|||
v.Ready = false
|
||||
v.speaking = false
|
||||
|
||||
v.log(LogInformational, "past lock")
|
||||
if v.close != nil {
|
||||
v.log(LogInformational, "closing v.close")
|
||||
close(v.close)
|
||||
v.close = nil
|
||||
}
|
||||
|
||||
v.log(LogInformational, "past closing v.close")
|
||||
if v.udpConn != nil {
|
||||
v.log(LogInformational, "closing udp")
|
||||
err := v.udpConn.Close()
|
||||
if err != nil {
|
||||
log.Println("error closing udp connection: ", err)
|
||||
|
@ -178,13 +182,16 @@ func (v *VoiceConnection) Close() {
|
|||
v.udpConn = nil
|
||||
}
|
||||
|
||||
v.log(LogInformational, "past closing udp")
|
||||
if v.wsConn != nil {
|
||||
v.log(LogInformational, "closing wsConn")
|
||||
err := v.wsConn.Close()
|
||||
if err != nil {
|
||||
log.Println("error closing websocket connection: ", err)
|
||||
}
|
||||
v.wsConn = nil
|
||||
}
|
||||
v.log(LogInformational, "all done, returning")
|
||||
}
|
||||
|
||||
// AddHandler adds a Handler for VoiceSpeakingUpdate events.
|
||||
|
|
Loading…
Reference in a new issue