浏览代码

Delete voice connection from map on error

Bruce Marriner 8 年之前
父节点
当前提交
383a3cf1e0
共有 1 个文件被更改,包括 1 次插入0 次删除
  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}}
 	err = s.wsConn.WriteJSON(data)
 	if err != nil {
+		delete(s.VoiceConnections, gID)
 		return
 	}