Skip to content

Commit

Permalink
Use the correct ip for the UDP socket (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Oct 20, 2019
1 parent 2734e27 commit c4b1c60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/model/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,7 @@ impl<'de> Deserialize<'de> for VoiceHeartbeatAck {
pub struct VoiceReady {
pub heartbeat_interval: u64,
pub modes: Vec<String>,
pub ip: String,
pub port: u16,
pub ssrc: u32,
#[serde(skip)]
Expand Down
2 changes: 1 addition & 1 deletion src/voice/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl Connection {
return Err(Error::Voice(VoiceError::VoiceModeUnavailable));
}

let destination = (&info.endpoint[..], ready.port)
let destination = (&ready.ip[..], ready.port)
.to_socket_addrs()?
.next()
.ok_or(Error::Voice(VoiceError::HostnameResolve))?;
Expand Down

0 comments on commit c4b1c60

Please sign in to comment.