fix crash of clients and propagate lookup failures

This commit is contained in:
Jeff Becker 2019-07-26 08:10:04 -04:00
parent ce2ff2a93e
commit 972d4f8672
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 6 additions and 3 deletions

View File

@ -728,10 +728,13 @@ namespace llarp
[=](const RouterID &id, const RouterContact *const rc,
const RCRequestResult result) {
(void)id;
std::vector< RouterContact > routers;
if(result == RCRequestResult::Success && rc != nullptr)
if(resultHandler)
{
routers.push_back(*rc);
std::vector< RouterContact > routers;
if(result == RCRequestResult::Success && rc != nullptr)
{
routers.push_back(*rc);
}
resultHandler(routers);
}
});