Commit 58156632 authored by AlexStocks's avatar AlexStocks

Imp: change validate cond

parent a4a37fec
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment