Skip to content

Commit

Permalink
Merge pull request #408 from dromara/dev
Browse files Browse the repository at this point in the history
内存泄漏:默认配置下 DtpExecutor 在 AbortPolicy 拒绝策略下,拒绝时产生内存泄露 #402
  • Loading branch information
yanhom1314 committed Feb 25, 2024
2 parents d1bbc96 + 34d433d commit 00b5291
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public RejectedInvocationHandler(Object target) {

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
beforeReject((Runnable) args[0], (Executor) args[1]);
try {
beforeReject((Runnable) args[0], (Executor) args[1]);
Object result = method.invoke(target, args);
afterReject((Runnable) args[0], (Executor) args[1]);
return result;
return method.invoke(target, args);
} catch (InvocationTargetException ex) {
throw ex.getCause();
} finally {
afterReject((Runnable) args[0], (Executor) args[1]);
}
}

Expand Down

0 comments on commit 00b5291

Please sign in to comment.