dont bind inbound links as client (#1419)

* dont bind inbound links as client

* fix broken test

* logic call MUST defer call
pull/1420/head
Jeff 4 years ago committed by GitHub
parent a01a622fce
commit 7a1207dc47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -712,8 +712,6 @@ namespace llarp
void
LinksConfig::defineConfigOptions(ConfigDefinition& conf, const ConfigGenParameters& params)
{
(void)params;
constexpr Default DefaultOutboundLinkValue{"0"};
conf.addSectionComments(
@ -754,9 +752,11 @@ namespace llarp
},
[this](std::string arg) { m_OutboundLink = LinkInfoFromINIValues("*", arg); });
if (std::string best_if; GetBestNetIF(best_if))
m_InboundLinks.push_back(LinkInfoFromINIValues(best_if, std::to_string(DefaultPublicPort)));
if (params.isRelay)
{
if (std::string best_if; GetBestNetIF(best_if))
m_InboundLinks.push_back(LinkInfoFromINIValues(best_if, std::to_string(DefaultPublicPort)));
}
conf.addUndeclaredHandler(
"bind",
[&, defaulted = true](

@ -1081,12 +1081,11 @@ namespace libuv
}
const auto inEventLoop = *m_EventLoopThreadID == std::this_thread::get_id();
if (inEventLoop)
if (inEventLoop and m_LogicCalls.full())
{
f();
FlushLogic();
}
else
m_LogicCalls.pushBack(f);
m_LogicCalls.pushBack(f);
uv_async_send(&m_WakeUp);
}

Loading…
Cancel
Save