summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
Diffstat (limited to 'static_pool.go')
-rw-r--r--static_pool.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/static_pool.go b/static_pool.go
index 80847f6e..42913b28 100644
--- a/static_pool.go
+++ b/static_pool.go
@@ -257,11 +257,11 @@ func (p *StaticPool) watchWorker(w *Worker) {
return
}
- p.throw(EventWorkerError, WorkerError{Worker: w, Caused: err})
-
// possible situation when major error causes all PHP scripts to die (for example dead DB)
if len(p.Workers()) == 0 {
- p.throw(EventPoolError, fmt.Errorf("unable to replace (last worker): %s", err))
+ p.throw(EventPoolError, err)
+ } else {
+ p.throw(EventWorkerError, WorkerError{Worker: w, Caused: err})
}
}
}