Delete voice connection from map on error

This commit is contained in:
Bruce Marriner 2016-03-16 22:48:48 -05:00
parent ee07ed8afe
commit 383a3cf1e0

View file

@ -369,6 +369,7 @@ func (s *Session) ChannelVoiceJoin(gID, cID string, mute, deaf bool) (voice *Voi
data := voiceChannelJoinOp{4, voiceChannelJoinData{&gID, &cID, mute, deaf}} data := voiceChannelJoinOp{4, voiceChannelJoinData{&gID, &cID, mute, deaf}}
err = s.wsConn.WriteJSON(data) err = s.wsConn.WriteJSON(data)
if err != nil { if err != nil {
delete(s.VoiceConnections, gID)
return return
} }