Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When override workQueue for the controller should shutdown the origin…
Browse files Browse the repository at this point in the history
…al queue incase thread leakage
yuzp1996 committed Oct 12, 2024
1 parent 471ed26 commit 0551270
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -104,6 +104,9 @@ public DefaultControllerBuilder withName(String controllerName) {
* @return the controller builder
*/
public DefaultControllerBuilder withWorkQueue(RateLimitingQueue<Request> workQueue) {
if (this.workQueue != null && !this.workQueue.isShuttingDown()){
this.workQueue.shutDown();
}
this.workQueue = workQueue;
return this;
}

0 comments on commit 0551270

Please sign in to comment.