diff options
author | Valery Piashchynski <[email protected]> | 2021-08-14 23:56:56 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-14 23:56:56 +0300 |
commit | 3383860a5e8ae8ef59b7b552b2228d5327511ab6 (patch) | |
tree | e3cebc99591ed11069a3f3889d43cac59b26702f /pkg/pool/static_pool.go | |
parent | 891df1a8c8db3d61ce7f4e9ba77076369a9a9ce3 (diff) |
Kill worker instead of stop while error occured.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/pool/static_pool.go')
-rwxr-xr-x | pkg/pool/static_pool.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/pool/static_pool.go b/pkg/pool/static_pool.go index 051e7a8a..b20e4242 100755 --- a/pkg/pool/static_pool.go +++ b/pkg/pool/static_pool.go @@ -272,7 +272,9 @@ func defaultErrEncoder(sp *StaticPool) ErrorEncoder { w.State().Set(worker.StateInvalid) sp.events.Push(events.PoolEvent{Event: events.EventWorkerDestruct, Payload: w}) - errS := w.Stop() + // kill worker instead of stop, because worker here might be in the broken state (network) which leads us + // to the error + errS := w.Kill() if errS != nil { return nil, errors.E(op, err, errS) } |