disable promises in win32

pull/14/head
Jeff Becker 6 years ago
parent 7237d701f1
commit dbac1334e0
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -88,9 +88,11 @@ namespace llarp
MarkIPActive(uint32_t ip);
private:
#ifndef _WIN32
/// handles setup, given value true on success and false on failure to set
/// up interface
std::promise< bool > m_TunSetupResult;
#endif
/// maps ip to service address
std::unordered_map< uint32_t, service::Address > m_IPToAddr;
/// maps service address to ip

@ -62,7 +62,9 @@ namespace llarp
// do network isolation first
if(!Endpoint::Start())
return false;
#ifdef _WIN32
return SetupNetworking();
#else
if(!NetworkIsIsolated())
{
// set up networking in currrent thread if we are not isolated
@ -72,6 +74,7 @@ namespace llarp
// wait for result for network setup
llarp::LogInfo("waiting for tun interface...");
return m_TunSetupResult.get_future().get();
#endif
}
constexpr uint32_t
@ -110,7 +113,9 @@ namespace llarp
{
llarp::LogInfo("Set Up networking for ", Name());
bool result = SetupTun();
#ifndef _WIN32
m_TunSetupResult.set_value(result);
#endif
return result;
}

Loading…
Cancel
Save