Log an error if STUN fails
This commit is contained in:
parent
48d8a53cd6
commit
9461ebec2d
1 changed files with 5 additions and 1 deletions
|
|
@ -579,9 +579,13 @@ private:
|
|||
|
||||
// Get the WAN IP address using STUN if we're on mDNS
|
||||
quint32 addr;
|
||||
if (LiFindExternalAddressIP4("stun.stunprotocol.org", 3478, &addr) == 0) {
|
||||
int err = LiFindExternalAddressIP4("stun.stunprotocol.org", 3478, &addr);
|
||||
if (err == 0) {
|
||||
newComputer->remoteAddress = QHostAddress(qFromBigEndian(addr)).toString();
|
||||
}
|
||||
else {
|
||||
qWarning() << "STUN failed to get WAN address:" << err;
|
||||
}
|
||||
}
|
||||
else {
|
||||
newComputer->manualAddress = m_Address;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue