Commit fa1de65b authored by Vincent van Beveren's avatar Vincent van Beveren

Fixed read time-out when cloning

parent 69df5429
......@@ -129,7 +129,20 @@ public abstract class DataSource {
}
// System.out.printf("Rescaling write, old-off=%d new-off=%d old-len=%d new-len=%d\n", off, nOff, data.length, nLen);
byte[] newData = read(ctx, nOff, nLen);
byte[] newData = null;
for (int retry = 0; retry < MAX_RETRIES; retry++)
{
newData = read(ctx, nOff, nLen);
if (newData != null) break;
try {
Thread.sleep(10);
} catch (InterruptedException e) {
}
}
if (newData == null) {
throw new RuntimeException("Failed to cache EEPROM data");
}
System.arraycopy(data, 0, newData, err, data.length);
off = nOff;
......
......@@ -254,7 +254,7 @@ public class DollyModel implements SFPDeviceListener, SFPProviderListener {
DDMIValue v = _selectedValues.get(_counter);
LOG.info("Copying value " + v.getLabel());
LOG.info("Copying value " + v.getName());
byte[] value;
try {
value = _vg.getValue(v);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment