Skip to content

Commit

Permalink
#2634 Fix possible Unreleased lock - Lock outside the try block
Browse files Browse the repository at this point in the history
  • Loading branch information
Limraj committed Aug 7, 2023
1 parent b5c37ab commit ba74234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/serotonin/timer/TimerTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public boolean cancel() {
boolean result = (state == SCHEDULED);

if (completeBeforeCancel) {
cancelLock.writeLock().lock();
try {
cancelLock.writeLock().lock();
state = CANCELLED;
}
finally {
Expand Down

0 comments on commit ba74234

Please sign in to comment.