try to continue scanning only if the loaded file seems incomplete

This commit is contained in:
Anton Keks 2014-05-25 20:42:11 +03:00
parent 71f80ed900
commit d643cdc959

View File

@ -93,7 +93,13 @@ public class ScanMenuActions {
resultTable.addOrUpdateResultRow(result);
}
stateMachine.transitionToNext();
if (!results.isEmpty()) {
String lastLoadedIP = results.get(results.size()-1).getAddress().getHostAddress();
String[] feederIPs = feederRegistry.current().serialize();
if (!lastLoadedIP.equals(feederIPs[1]))
stateMachine.transitionToNext(); // we need to continue previous scan
}
}
catch (Exception e) {
throw new UserErrorException("fileLoad.failed", e);