mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 07:05:26 -04:00
Fix hidden node crashing at the startup, caused by calling uninitialized objects.
This commit is contained in:
parent
891d7e7c9a
commit
6863f4cc70
2 changed files with 8 additions and 6 deletions
|
@ -1803,15 +1803,16 @@ void p3NetMgrIMPL::updateNatSetting()
|
|||
#endif
|
||||
|
||||
#ifdef RS_USE_DHT_STUNNER
|
||||
switch(natType)
|
||||
{
|
||||
case RSNET_NATTYPE_RESTRICTED_CONE:
|
||||
if (mProxyStunner) {
|
||||
switch(natType)
|
||||
{
|
||||
case RSNET_NATTYPE_RESTRICTED_CONE:
|
||||
{
|
||||
if ((natHole == RSNET_NATHOLE_NONE) || (natHole == RSNET_NATHOLE_UNKNOWN))
|
||||
{
|
||||
mProxyStunner->setRefreshPeriod(NET_STUNNER_PERIOD_FAST);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
mProxyStunner->setRefreshPeriod(NET_STUNNER_PERIOD_SLOW);
|
||||
}
|
||||
|
@ -1826,6 +1827,7 @@ void p3NetMgrIMPL::updateNatSetting()
|
|||
|
||||
mProxyStunner->setRefreshPeriod(NET_STUNNER_PERIOD_SLOW);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif // RS_USE_DHT_STUNNER
|
||||
|
||||
|
|
|
@ -291,8 +291,8 @@ private:
|
|||
|
||||
//p3BitDht *mBitDht;
|
||||
#ifdef RS_USE_DHT_STUNNER
|
||||
pqiAddrAssist *mDhtStunner;
|
||||
pqiAddrAssist *mProxyStunner;
|
||||
pqiAddrAssist *mDhtStunner = nullptr;
|
||||
pqiAddrAssist *mProxyStunner = nullptr;
|
||||
#endif // RS_USE_DHT_STUNNER
|
||||
|
||||
RsMutex mNetMtx; /* protects below */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue