mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Let's just move this whole sso check up to make code flow a bit easier to reason about
This commit is contained in:
parent
326f7f7254
commit
fbeae3c468
1 changed files with 26 additions and 30 deletions
|
@ -1781,21 +1781,7 @@ void EmbeddedNetworkController::_startThreads()
|
||||||
if (qe) {
|
if (qe) {
|
||||||
try {
|
try {
|
||||||
_request(qe->nwid,qe->fromAddr,qe->requestPacketId,qe->identity,qe->metaData);
|
_request(qe->nwid,qe->fromAddr,qe->requestPacketId,qe->identity,qe->metaData);
|
||||||
if (!_db.get(qe->nwid, network, qe->identity.address().toInt(), member)) {
|
if (_db.get(qe->nwid, network, qe->identity.address().toInt(), member)) {
|
||||||
delete qe;
|
|
||||||
qe = nullptr;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} catch (std::exception &e) {
|
|
||||||
fprintf(stderr,"ERROR: exception in controller request handling thread: %s" ZT_EOL_S,e.what());
|
|
||||||
} catch ( ... ) {
|
|
||||||
fprintf(stderr,"ERROR: exception in controller request handling thread: unknown exception" ZT_EOL_S);
|
|
||||||
}
|
|
||||||
delete qe;
|
|
||||||
qe = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool networkSSOEnabled = OSUtils::jsonBool(network["ssoEnabled"], false);
|
bool networkSSOEnabled = OSUtils::jsonBool(network["ssoEnabled"], false);
|
||||||
if (networkSSOEnabled) {
|
if (networkSSOEnabled) {
|
||||||
int64_t now = OSUtils::now();
|
int64_t now = OSUtils::now();
|
||||||
|
@ -1822,6 +1808,16 @@ void EmbeddedNetworkController::_startThreads()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (std::exception &e) {
|
||||||
|
fprintf(stderr,"ERROR: exception in controller request handling thread: %s" ZT_EOL_S,e.what());
|
||||||
|
} catch ( ... ) {
|
||||||
|
fprintf(stderr,"ERROR: exception in controller request handling thread: unknown exception" ZT_EOL_S);
|
||||||
|
}
|
||||||
|
delete qe;
|
||||||
|
qe = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue