Skip to content

Commit

Permalink
feat(voice): use Dialer for connections (#1220)
Browse files Browse the repository at this point in the history
Use Session.Dialer for WebSocket connections.
  • Loading branch information
FedorLap2006 committed Aug 13, 2022
1 parent f7309cd commit 7c87035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voice.go
Expand Up @@ -304,7 +304,7 @@ func (v *VoiceConnection) open() (err error) {
// Connect to VoiceConnection Websocket
vg := "wss://" + strings.TrimSuffix(v.endpoint, ":80")
v.log(LogInformational, "connecting to voice endpoint %s", vg)
v.wsConn, _, err = websocket.DefaultDialer.Dial(vg, nil)
v.wsConn, _, err = v.session.Dialer.Dial(vg, nil)
if err != nil {
v.log(LogWarning, "error connecting to voice endpoint %s, %s", vg, err)
v.log(LogDebug, "voice struct: %#v\n", v)
Expand Down

0 comments on commit 7c87035

Please sign in to comment.