forked from j62/ctbrec
1
0
Fork 0

In resumeRecording don't start a recording, if the model is offline

This commit is contained in:
0xboobface 2018-12-01 16:56:43 +01:00
parent 4a8e0e3bea
commit 6ab70dd5df
1 changed files with 5 additions and 1 deletions

View File

@ -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();
} }