diff options
author | Wolfy-J <[email protected]> | 2018-06-13 13:10:59 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-13 13:10:59 +0300 |
commit | 436d4bc263137640b4f0a58e27a82619bca10e85 (patch) | |
tree | 6e3ec0d00c804389f916fae3995c37d29442862d /static_pool.go | |
parent | d2c7ee8c0a070b9790d5552d3f607ca01e1ab798 (diff) |
minor improvements
Diffstat (limited to 'static_pool.go')
-rw-r--r-- | static_pool.go | 6 |
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}) } } } |