Ensure active future is always completed

This commit is contained in:
Chris Eager authored and Chris Eager committed 2021-07-02 15:05:11 -05:00
1 parent d5b0d99a54
commit 530b2a310f
2 files changed
+14 -11

No files matched your search

@@ -107,8 +107,11 @@ public abstract class ManagedPeriodicWork implements Managed {
Util.sleep(sleepDurationAfterUnexpectedException.toMillis());
} finally {
lock.releaseActiveWork(workerId);
activeExecutionFuture.get().complete(null);
try {
lock.releaseActiveWork(workerId);
} finally {
activeExecutionFuture.get().complete(null);
}
}
}
}