Преглед на файлове

Fix broken IP Discovery in voice connection. (#669)

https://github.com/bwmarrin/discordgo/issues/598
https://github.com/bwmarrin/discordgo/issues/668
yuko1225 преди 5 години
родител
ревизия
d7c22e2791
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      voice.go

+ 1 - 1
voice.go

@@ -593,7 +593,7 @@ func (v *VoiceConnection) udpOpen() (err error) {
 	}
 
 	// Grab port from position 68 and 69
-	port := binary.LittleEndian.Uint16(rb[68:70])
+	port := binary.BigEndian.Uint16(rb[68:70])
 
 	// Take the data from above and send it back to Discord to finalize
 	// the UDP connection handshake.