From 096e6f15134c25c32bb374edbfd85abdbfc767d0 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sat, 26 Jan 2019 13:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=81=20Fix=20the=20bug=20in=20function?= =?UTF-8?q?=20"Submit()"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool.go b/pool.go index 05b8b43..fbf3b80 100644 --- a/pool.go +++ b/pool.go @@ -122,7 +122,7 @@ func NewTimingPool(size, expiry int) (*Pool, error) { // Submit submits a task to this pool. func (p *Pool) Submit(task f) error { - if p.release == nil { + if p.release != nil { return ErrPoolClosed } p.getWorker().task <- task