mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 04:14:27 -04:00
fixed problem causing infinite loop of net reset in p3NetMgr
This commit is contained in:
parent
f3b0f7af1f
commit
8edb1f7535
1 changed files with 4 additions and 1 deletions
|
@ -1134,8 +1134,11 @@ bool p3NetMgrIMPL::checkNetAddress()
|
||||||
* are the same (modify server)... this mismatch can
|
* are the same (modify server)... this mismatch can
|
||||||
* occur when the local port is changed....
|
* occur when the local port is changed....
|
||||||
*/
|
*/
|
||||||
if (sockaddr_storage_sameip(mLocalAddr, mExtAddr))
|
if (sockaddr_storage_sameip(mLocalAddr, mExtAddr) && sockaddr_storage_port(mLocalAddr) != sockaddr_storage_port(mExtAddr))
|
||||||
{
|
{
|
||||||
|
#ifdef NETMGR_DEBUG_RESET
|
||||||
|
std::cerr << "p3NetMgrIMPL::checkNetAddress() local and external ports are not the same. Setting external port to " << sockaddr_storage_port(mLocalAddr) << std::endl;
|
||||||
|
#endif
|
||||||
sockaddr_storage_setport(mExtAddr, sockaddr_storage_port(mLocalAddr));
|
sockaddr_storage_setport(mExtAddr, sockaddr_storage_port(mLocalAddr));
|
||||||
addrChanged = true;
|
addrChanged = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue