1
0
Fork 0

잘못된 루프 수정

This commit is contained in:
Sangbum Kim 2017-09-11 01:02:56 +09:00
parent b278e41b2e
commit ca421b372e
1 changed files with 2 additions and 1 deletions

View File

@ -52,10 +52,11 @@ func (c *fanControl) StartControl() {
for { for {
newFanSpeedList := make([]int, c.processorCount) newFanSpeedList := make([]int, c.processorCount)
checker:
for { for {
select { select {
case <-ticker: case <-ticker:
break break checker
case changedSpeed := <-c.fanSpeedConsumer: case changedSpeed := <-c.fanSpeedConsumer:
newFanSpeedList[changedSpeed.Id] = changedSpeed.FanSpeed newFanSpeedList[changedSpeed.Id] = changedSpeed.FanSpeed
case <-c.handler.Done(): case <-c.handler.Done():