Fix bug, which could cause recordings to get stuck
This commit is contained in:
parent
f3c0066d93
commit
dd6f41a574
|
@ -1,3 +1,7 @@
|
|||
4.1.2
|
||||
========================
|
||||
* Fixed bug, which caused recordings to get stuck
|
||||
|
||||
4.1.1
|
||||
========================
|
||||
* Added open in browser to context menu of thumb overviews
|
||||
|
|
|
@ -150,9 +150,9 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
if (!future.isDone()) {
|
||||
downloadFutureQueue.put(future);
|
||||
} else {
|
||||
downloadFutureRecordingMap.remove(future);
|
||||
Recording rec = future.get();
|
||||
Download d = rec.getDownload();
|
||||
downloadFutureRecordingMap.remove(future);
|
||||
if (d.isRunning()) {
|
||||
long delay = Math.max(0, Duration.between(Instant.now(), d.getRescheduleTime()).toMillis());
|
||||
ScheduledFuture<Recording> rescheduledFuture = downloadPool.schedule(rec, delay, TimeUnit.MILLISECONDS);
|
||||
|
@ -182,6 +182,7 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
private void fail(ScheduledFuture<Recording> future, Exception e) {
|
||||
if (downloadFutureRecordingMap.containsKey(future)) {
|
||||
Recording rec = downloadFutureRecordingMap.remove(future);
|
||||
deleteIfEmpty(rec);
|
||||
removeRecordingProcess(rec);
|
||||
rec.getDownload().finalizeDownload();
|
||||
LOG.error("Error while recording stream for model {}", rec.getModel(), e);
|
||||
|
|
Loading…
Reference in New Issue