summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpkg/pool/static_pool_test.go2
-rwxr-xr-xpkg/worker_watcher/worker_watcher.go4
-rwxr-xr-xrrbin32768 -> 0 bytes
3 files changed, 5 insertions, 1 deletions
diff --git a/pkg/pool/static_pool_test.go b/pkg/pool/static_pool_test.go
index 65e10119..6ffb05b3 100755
--- a/pkg/pool/static_pool_test.go
+++ b/pkg/pool/static_pool_test.go
@@ -454,7 +454,7 @@ func Test_Static_Pool_Handle_Dead(t *testing.T) {
pipe.NewPipeFactory(),
Config{
NumWorkers: 5,
- AllocateTimeout: time.Second,
+ AllocateTimeout: time.Second * 100,
DestroyTimeout: time.Second,
},
)
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 {
diff --git a/rr b/rr
deleted file mode 100755
index 8a7ac396..00000000
--- a/rr
+++ /dev/null
Binary files differ