From be6340f7a65b41676558469cdcca4bfeab331b01 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Wed, 17 Apr 2019 20:32:53 +0530 Subject: [PATCH] Fix HotRod job pool termination (#1453) (#1454) Signed-off-by: Muhammad Falak R Wani --- examples/hotrod/pkg/pool/pool.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/hotrod/pkg/pool/pool.go b/examples/hotrod/pkg/pool/pool.go index 172064e7351..6ead5a1aba9 100644 --- a/examples/hotrod/pkg/pool/pool.go +++ b/examples/hotrod/pkg/pool/pool.go @@ -49,5 +49,7 @@ func (p *Pool) Execute(job func()) { // Stop halts all the workers func (p *Pool) Stop() { - p.stop <- struct{}{} + if p.stop != nil { + close(p.stop) + } }