disable dns if emscripten

This commit is contained in:
woodser
2020-06-30 12:41:30 -04:00
parent 92ffa11d02
commit 55a3a6b5ff
+8 -3
View File
@@ -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
}