Don't retry reads if we're not talking to actual hardware.

Fixes #18.
This commit is contained in:
David Given
2019-02-24 23:57:46 +01:00
parent 58c4f14f3e
commit 75a321beef
4 changed files with 17 additions and 1 deletions

View File

@@ -65,6 +65,11 @@ void Track::recalibrate()
_fluxReader->recalibrate();
}
bool Track::retryable()
{
return _fluxReader->retryable();
}
std::vector<std::unique_ptr<Track>> readTracks()
{
const DataSpec& dataSpec = source.value;
@@ -172,6 +177,9 @@ void readDiskCommand(AbstractDecoder& decoder, const std::string& outputFilename
std::cout << std::endl
<< " ";
if (!track->retryable())
break;
if (retry == 0)
std::cout << "giving up" << std::endl
<< " ";