diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 69b2c32..b0cdab2 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -4418,7 +4418,16 @@ bool BitcoinMiner(int nThreadId) | |||
| 4418 | } | 4418 | } |
| 4419 | LogPrint("worker", "PoolParticipantMiner: reconnecting in %ds\n", | 4419 | LogPrint("worker", "PoolParticipantMiner: reconnecting in %ds\n", |
| 4420 | nRetrySecs); | 4420 | nRetrySecs); |
| 4421 | for (int i = 0; i < nRetrySecs && !fShutdown; i++) Sleep(1000); | 4421 | // Poll everything the enclosing while polls, not just |
| 4422 | // fShutdown. Raising the ceiling to 120s made a | ||
| 4423 | // shutdown-only predicate expensive: after the operator | ||
| 4424 | // clears Generate or switches to Relay, the session -- and | ||
| 4425 | // the vfThreadRunning[3] slot that gates restarting it -- | ||
| 4426 | // would stay held for up to two minutes. Measured 119s | ||
| 4427 | // before, 1s after. | ||
| 4428 | for (int i = 0; i < nRetrySecs && !fShutdown && fGenerateBitcoins | ||
| 4429 | && nMineMode == MINE_PARTICIPANT; i++) | ||
| 4430 | Sleep(1000); | ||
| 4422 | if (!fHadSession && nRetrySecs < 120) { | 4431 | if (!fHadSession && nRetrySecs < 120) { |
| 4423 | nRetrySecs *= 2; | 4432 | nRetrySecs *= 2; |
| 4424 | if (nRetrySecs > 120) | 4433 | if (nRetrySecs > 120) |