mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 20:18:05 +01:00
Ensure active future is always completed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user