Delete voice connection from map on error
This commit is contained in:
parent
ee07ed8afe
commit
383a3cf1e0
1 changed files with 1 additions and 0 deletions
1
wsapi.go
1
wsapi.go
|
@ -369,6 +369,7 @@ func (s *Session) ChannelVoiceJoin(gID, cID string, mute, deaf bool) (voice *Voi
|
|||
data := voiceChannelJoinOp{4, voiceChannelJoinData{&gID, &cID, mute, deaf}}
|
||||
err = s.wsConn.WriteJSON(data)
|
||||
if err != nil {
|
||||
delete(s.VoiceConnections, gID)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue