Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Correct handling of --display-interval. (Cherry pick for v0.16.1) #1606

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions ethminer/main.cpp
Original file line number Diff line number Diff line change
@@ -897,12 +897,15 @@ class MinerCLI
// Wait at the beginning of the loop to give some time
// services to start properly. Otherwise we get a "not-connected"
// message immediately
this_thread::sleep_for(chrono::seconds(2));
if (interval > 2)
{
interval -= 2;

// Split m_displayInterval in 1 second parts to optain a faster exit
this_thread::sleep_for(chrono::seconds(1));
interval--;
if (interval)
continue;
}
interval = m_displayInterval;

// Display current stats of the farm if it's connected
if (mgr.isConnected())
{
auto mp = f.miningProgress();
@@ -916,7 +919,6 @@ class MinerCLI
{
minelog << "not-connected";
}
interval = m_displayInterval;
}

#if API_CORE