mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 16:25:54 +00:00
Only store the local address from mDNS if it actually worked
This commit is contained in:
parent
940da6bc73
commit
5e106d2f19
@ -665,7 +665,12 @@ private:
|
|||||||
|
|
||||||
// Update addresses depending on the context
|
// Update addresses depending on the context
|
||||||
if (m_Mdns) {
|
if (m_Mdns) {
|
||||||
newComputer->localAddress = m_Address;
|
// Only update local address if we actually reached the PC via this address.
|
||||||
|
// If we reached it via the IPv6 address after the local address failed,
|
||||||
|
// don't store the non-working local address.
|
||||||
|
if (http.address() == m_Address) {
|
||||||
|
newComputer->localAddress = m_Address;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the WAN IP address using STUN if we're on mDNS over IPv4
|
// Get the WAN IP address using STUN if we're on mDNS over IPv4
|
||||||
if (QHostAddress(newComputer->localAddress).protocol() == QAbstractSocket::IPv4Protocol) {
|
if (QHostAddress(newComputer->localAddress).protocol() == QAbstractSocket::IPv4Protocol) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user