summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
Diffstat (limited to 'static_pool.go')
-rwxr-xr-xstatic_pool.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/static_pool.go b/static_pool.go
index b626a499..fbb2e5e8 100755
--- a/static_pool.go
+++ b/static_pool.go
@@ -162,7 +162,8 @@ func (sp *StaticPool) Exec(p Payload) (Payload, error) {
}
// worker want's to be terminated
- if rsp.Body == nil && rsp.Context != nil && string(rsp.Context) == StopRequest {
+ // TODO careful with string(rsp.Context)
+ if len(rsp.Body) == 0 && string(rsp.Context) == StopRequest {
sw.State().Set(StateInvalid)
err = sw.Stop(bCtx)
if err != nil {