mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
null check
This commit is contained in:
parent
b5602228a3
commit
686fb311ad
1 changed files with 4 additions and 1 deletions
|
@ -65,7 +65,8 @@ struct TryConnectJob
|
||||||
Failed()
|
Failed()
|
||||||
{
|
{
|
||||||
llarp::LogInfo("session to ", llarp::RouterID(rc.pubkey), " closed");
|
llarp::LogInfo("session to ", llarp::RouterID(rc.pubkey), " closed");
|
||||||
link->CloseSessionTo(rc.pubkey);
|
if(link)
|
||||||
|
link->CloseSessionTo(rc.pubkey);
|
||||||
// delete this
|
// delete this
|
||||||
router->pendingEstablishJobs.erase(rc.pubkey);
|
router->pendingEstablishJobs.erase(rc.pubkey);
|
||||||
}
|
}
|
||||||
|
@ -97,6 +98,8 @@ struct TryConnectJob
|
||||||
Attempt()
|
Attempt()
|
||||||
{
|
{
|
||||||
--triesLeft;
|
--triesLeft;
|
||||||
|
if(!link)
|
||||||
|
return false;
|
||||||
if(!link->TryEstablishTo(rc))
|
if(!link->TryEstablishTo(rc))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue