Skip to content
Permalink
Browse files
Imp: change validate cond
  • Loading branch information
AlexStocks committed Jun 11, 2019
1 parent a4a37fe commit 58156632a4f76046509d7c07c94a19edef527228
Showing 1 changed file with 2 additions and 2 deletions.
@@ -121,11 +121,11 @@ type TaskPoolOptions struct {
}

func (o *TaskPoolOptions) validate() {
if o.tQPoolSize == 0 {
if o.tQPoolSize < 1 {
panic(fmt.Sprintf("[getty][task_pool] illegal pool size %d", o.tQPoolSize))
}

if o.tQLen == 0 {
if o.tQLen < 1 {
o.tQLen = defaultTaskQLen
}

0 comments on commit 5815663

Please sign in to comment.