Browse Source

Delete voice connection from map on error

Bruce Marriner 8 years ago
parent
commit
383a3cf1e0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      wsapi.go

+ 1 - 0
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}}
 	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
 	}
 	}