4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 20:29:24 +00:00

Update vendor bwmarrin/discordgo

This commit is contained in:
Wim
2018-02-14 22:22:35 +01:00
parent 2522158127
commit fd0fe3390b
13 changed files with 328 additions and 200 deletions

View File

@ -13,7 +13,6 @@ import (
"encoding/binary"
"encoding/json"
"fmt"
"log"
"net"
"strings"
"sync"
@ -69,7 +68,7 @@ type VoiceConnection struct {
voiceSpeakingUpdateHandlers []VoiceSpeakingUpdateHandler
}
// VoiceSpeakingUpdateHandler type provides a function defination for the
// VoiceSpeakingUpdateHandler type provides a function definition for the
// VoiceSpeakingUpdate event
type VoiceSpeakingUpdateHandler func(vc *VoiceConnection, vs *VoiceSpeakingUpdate)
@ -104,7 +103,7 @@ func (v *VoiceConnection) Speaking(b bool) (err error) {
defer v.Unlock()
if err != nil {
v.speaking = false
log.Println("Speaking() write json error:", err)
v.log(LogError, "Speaking() write json error:", err)
return
}
@ -181,7 +180,7 @@ func (v *VoiceConnection) Close() {
v.log(LogInformational, "closing udp")
err := v.udpConn.Close()
if err != nil {
log.Println("error closing udp connection: ", err)
v.log(LogError, "error closing udp connection: ", err)
}
v.udpConn = nil
}
@ -247,7 +246,7 @@ type voiceOP2 struct {
}
// WaitUntilConnected waits for the Voice Connection to
// become ready, if it does not become ready it retuns an err
// become ready, if it does not become ready it returns an err
func (v *VoiceConnection) waitUntilConnected() error {
v.log(LogInformational, "called")
@ -858,7 +857,7 @@ func (v *VoiceConnection) reconnect() {
}
if v.session.DataReady == false || v.session.wsConn == nil {
v.log(LogInformational, "cannot reconenct to channel %s with unready session", v.ChannelID)
v.log(LogInformational, "cannot reconnect to channel %s with unready session", v.ChannelID)
continue
}