Skip to content

Commit 6bc1880

Browse files
authored
Merge pull request #3737 from yuzp1996/master
Shutdown original queue before override
2 parents a145204 + 6041de7 commit 6bc1880

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extended/src/main/java/io/kubernetes/client/extended/controller/builder/DefaultControllerBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ public DefaultControllerBuilder withName(String controllerName) {
104104
* @return the controller builder
105105
*/
106106
public DefaultControllerBuilder withWorkQueue(RateLimitingQueue<Request> workQueue) {
107+
if (this.workQueue != null && !this.workQueue.isShuttingDown()){
108+
this.workQueue.shutDown();
109+
}
107110
this.workQueue = workQueue;
108111
return this;
109112
}

0 commit comments

Comments
 (0)