Skip to content

Commit 8882a06

Browse files
committed
Don't toggle away from fallback pool when user explicitly selected it
1 parent 3db03e6 commit 8882a06

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

main/tasks/stratum_task.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,15 @@ void stratum_task(void * pvParameters)
512512
continue;
513513
}
514514

515+
// If user explicitly selected fallback, don't toggle away from it
516+
if (GLOBAL_STATE->SYSTEM_MODULE.use_fallback_stratum) {
517+
ESP_LOGI(TAG, "User selected fallback pool, staying on fallback (retries: %d)...", retry_attempts);
518+
retry_attempts = 0;
519+
continue;
520+
}
521+
515522
GLOBAL_STATE->SYSTEM_MODULE.is_using_fallback = !GLOBAL_STATE->SYSTEM_MODULE.is_using_fallback;
516-
523+
517524
// Reset share stats at failover
518525
for (int i = 0; i < GLOBAL_STATE->SYSTEM_MODULE.rejected_reason_stats_count; i++) {
519526
GLOBAL_STATE->SYSTEM_MODULE.rejected_reason_stats[i].count = 0;

0 commit comments

Comments
 (0)