summaryrefslogtreecommitdiff
path: root/pkg/worker_watcher/worker_watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/worker_watcher/worker_watcher.go')
-rwxr-xr-xpkg/worker_watcher/worker_watcher.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/worker_watcher/worker_watcher.go b/pkg/worker_watcher/worker_watcher.go
index 1e229d9d..d065bae5 100755
--- a/pkg/worker_watcher/worker_watcher.go
+++ b/pkg/worker_watcher/worker_watcher.go
@@ -54,6 +54,10 @@ func (ww *workerWatcher) Get(ctx context.Context) (worker.SyncWorker, error) {
}
// =========================================================
// SLOW PATH
+ // Put worker back (no matter it's state, it will be killed next)
+ if w != nil {
+ ww.stack.Push(w)
+ }
// no free workers in the stack
// try to continuously get free one
for {