From 3329f87b1488c84ec99989b8b25d528f6ff68ef4 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Fri, 24 Jun 2016 13:11:25 -0500 Subject: [PATCH] Added lots of temp logs into voice close func --- voice.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/voice.go b/voice.go index 66de123..e08b9ff 100644 --- a/voice.go +++ b/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.