diff options
Diffstat (limited to 'pool/supervisor_pool.go')
-rwxr-xr-x | pool/supervisor_pool.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pool/supervisor_pool.go b/pool/supervisor_pool.go index 1a94f6a0..a7a1ae52 100755 --- a/pool/supervisor_pool.go +++ b/pool/supervisor_pool.go @@ -84,15 +84,17 @@ func (sp *supervised) RemoveWorker(worker worker.BaseProcess) error { func (sp *supervised) Destroy(ctx context.Context) { sp.pool.Destroy(ctx) + sp.Stop() } func (sp *supervised) Start() { go func() { watchTout := time.NewTicker(sp.cfg.WatchTick) + defer watchTout.Stop() + for { select { case <-sp.stopCh: - watchTout.Stop() return // stop here case <-watchTout.C: |