Log an error if STUN fails

This commit is contained in:
Cameron Gutman
2018-10-26 20:54:17 -07:00
parent 48d8a53cd6
commit 9461ebec2d

View File

@@ -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;