forked from j62/ctbrec
In resumeRecording don't start a recording, if the model is offline
This commit is contained in:
parent
4a8e0e3bea
commit
6ab70dd5df
|
@ -761,13 +761,17 @@ public class LocalRecorder implements Recorder {
|
||||||
int index = models.indexOf(model);
|
int index = models.indexOf(model);
|
||||||
Model m = models.get(index);
|
Model m = models.get(index);
|
||||||
m.setSuspended(false);
|
m.setSuspended(false);
|
||||||
startRecordingProcess(m);
|
if(m.isOnline()) {
|
||||||
|
startRecordingProcess(m);
|
||||||
|
}
|
||||||
model.setSuspended(false);
|
model.setSuspended(false);
|
||||||
config.save();
|
config.save();
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("Couldn't resume model {}. Not found in list", model.getName());
|
LOG.warn("Couldn't resume model {}. Not found in list", model.getName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} catch (ExecutionException | InterruptedException e) {
|
||||||
|
LOG.error("Couldn't check, if model {} is online", model.getName());
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue