a wild pointer captrued

This commit is contained in:
mikespook 2012-11-21 17:53:49 +08:00
parent 665bef9eb2
commit 91b315d61b

View File

@ -178,8 +178,8 @@ func (worker *Worker) Work() {
go v.Work()
}
ok := true
var job *Job
for ok {
var job *Job
if job, ok = <-worker.in; ok {
go func() {
defer job.Close()