From 397d04b1ff869482a18388beab3b7528b1d5e1f4 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Thu, 17 Mar 2016 14:02:19 -0500 Subject: [PATCH] Fix a couple bugs I just created. --- voice.go | 4 ++-- wsapi.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/voice.go b/voice.go index ea74a42..89b01a6 100644 --- a/voice.go +++ b/voice.go @@ -615,7 +615,7 @@ func (v *VoiceConnection) opusReceiver(UDPConn *net.UDPConn, close <-chan struct } // Close closes the voice ws and udp connections -func (v *VoiceConnection) close() { +func (v *VoiceConnection) Close() { v.Lock() defer v.Unlock() @@ -667,7 +667,7 @@ func (v *VoiceConnection) Disconnect() (err error) { } // Close websocket and udp connections - v.close() + v.Close() delete(v.session.VoiceConnections, v.GuildID) diff --git a/wsapi.go b/wsapi.go index fed86ea..4f74dc7 100644 --- a/wsapi.go +++ b/wsapi.go @@ -344,7 +344,7 @@ func (s *Session) ChannelVoiceJoin(gID, cID string, mute, deaf bool) (voice *Voi // to verify if this connection is valid or not. if voice.ChannelID != cID { - err = voice.ChangeChannel(cID) + err = voice.ChangeChannel(cID, mute, deaf) } return }