From 55a3a6b5ffc295cf442f70b6c742532a2876fcfe Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 30 Jun 2020 12:41:30 -0400 Subject: [PATCH] disable dns if emscripten --- src/wallet/monero_wallet_core.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/wallet/monero_wallet_core.cpp b/src/wallet/monero_wallet_core.cpp index 6a41c93b..2f607d20 100644 --- a/src/wallet/monero_wallet_core.cpp +++ b/src/wallet/monero_wallet_core.cpp @@ -3060,9 +3060,14 @@ namespace monero { m_sync_loop_running = false; m_syncing_interval = DEFAULT_SYNC_INTERVAL_MILLIS; - // single-threaded if emscripten - #if defined(__EMSCRIPTEN__) && !defined(__EMSCRIPTEN_PTHREADS__) - tools::set_max_concurrency(1); // TODO: single-threaded emscripten tools::get_max_concurrency() correctly returns 1 on Safari but 8 on Chrome which fails in common/threadpool constructor + // emscripten config + #if defined(__EMSCRIPTEN__) + m_w2->enable_dns(false); + + // single-threaded if emscripten pthreads not defined + #if !defined(__EMSCRIPTEN_PTHREADS__) + tools::set_max_concurrency(1); // TODO: single-threaded emscripten tools::get_max_concurrency() correctly returns 1 on Safari but 8 on Chrome which fails in common/threadpool constructor + #endif #endif }