Skip to content

Commit

Permalink
Init P2P server before Stratum server (fixed a data race)
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Oct 23, 2024
1 parent 831edc4 commit c9193c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/p2pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,8 @@ void p2pool::download_block_headers(uint64_t current_height)
if (parse_block_headers_range(data, size) == current_height - start_height) {
update_median_timestamp();
if (m_serversStarted.exchange(1) == 0) {
m_stratumServer = new StratumServer(this);
m_p2pServer = new P2PServer(this);
m_stratumServer = new StratumServer(this);
#ifdef WITH_RANDOMX
if (m_params->m_minerThreads) {
start_mining(m_params->m_minerThreads);
Expand Down

0 comments on commit c9193c5

Please sign in to comment.