Skip to content

Commit

Permalink
do not close worker chan
Browse files Browse the repository at this point in the history
don't close worker chan after put work, will cause dead loop
  • Loading branch information
wanyaoqi committed May 13, 2020
1 parent 93a8f42 commit 7bcedd4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/appsrv/workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ func (worker *SWorker) run() {
task := req.(*sWorkerTask)
if task.worker != nil {
task.worker <- worker
// worker channel is buffered
// close the worker channel
close(task.worker)
}
execCallback(task)
} else {
Expand Down

0 comments on commit 7bcedd4

Please sign in to comment.