better logging

pull/686/head
Jeff Becker 5 years ago
parent 5eb7ec493f
commit ef50c726b1
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1216,10 +1216,12 @@ namespace llarp
resultHandler = std::bind(&Router::HandleRouterLookupForExpireUpdate,
this, remote, std::placeholders::_1);
}
// if we are a client try using the hidden service endpoints
if(!IsServiceNode())
{
bool sent = false;
LogInfo("Lookup ", remote, " anonymously");
_hiddenServiceContext.ForEachService(
[&](const std::string &,
const std::shared_ptr< service::Endpoint > &ep) -> bool {
@ -1229,9 +1231,11 @@ namespace llarp
});
if(sent)
return;
LogWarn("cannot lookup ", remote, " anonymously");
}
// if we are service node or failed to use hidden service endpoints as
// client do a direct lookup
LogInfo("Lookup ", remote, " direct");
dht()->impl->LookupRouter(remote, resultHandler);
}

Loading…
Cancel
Save