잘못된 루프 수정
This commit is contained in:
parent
b278e41b2e
commit
ca421b372e
|
@ -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():
|
||||||
|
|
Loading…
Reference in New Issue