Skip to content

Commit

Permalink
Merge branch 'mrniko:master' into websocket-leak-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
berinhardt authored Aug 6, 2024
2 parents 17ed3a0 + 6981e0c commit 9675e98
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ public void run(Timeout timeout) throws Exception {
ctx.executor().execute(new Runnable() {
@Override
public void run() {
try {
runnable.run();
} finally {
scheduledFutures.remove(key);
}
scheduledFutures.remove(key);
runnable.run();
}
});
}
Expand All @@ -98,11 +95,8 @@ public void schedule(final SchedulerKey key, final Runnable runnable, long delay
Timeout timeout = executorService.newTimeout(new TimerTask() {
@Override
public void run(Timeout timeout) throws Exception {
try {
runnable.run();
} finally {
scheduledFutures.remove(key);
}
scheduledFutures.remove(key);
runnable.run();
}
}, delay, unit);

Expand Down

0 comments on commit 9675e98

Please sign in to comment.