Skip to content

Commit

Permalink
disable dns if emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Jun 30, 2020
1 parent 92ffa11 commit 55a3a6b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/wallet/monero_wallet_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

1 comment on commit 55a3a6b

@woodser
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.