Fix hidden node crashing at the startup, caused by calling uninitialized objects.

This commit is contained in:
hunbernd 2020-06-21 21:55:52 +02:00
parent 891d7e7c9a
commit 6863f4cc70
2 changed files with 8 additions and 6 deletions

View file

@ -1803,6 +1803,7 @@ void p3NetMgrIMPL::updateNatSetting()
#endif
#ifdef RS_USE_DHT_STUNNER
if (mProxyStunner) {
switch(natType)
{
case RSNET_NATTYPE_RESTRICTED_CONE:
@ -1827,6 +1828,7 @@ void p3NetMgrIMPL::updateNatSetting()
mProxyStunner->setRefreshPeriod(NET_STUNNER_PERIOD_SLOW);
break;
}
}
#endif // RS_USE_DHT_STUNNER
/* This controls the Attach mode of the DHT...

View file

@ -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 */