diff --git a/async_task.go b/async_task.go index 101bf7b..16fc9cc 100644 --- a/async_task.go +++ b/async_task.go @@ -112,7 +112,7 @@ func NewCompletedTask() *TaskStatus { result: nil, err: nil, // nil cancelFunc and waitGroup should be protected with IsTerminalState() - cancelFunc: func() {}, + cancelFunc: nil, waitGroup: nil, } }