fix: rotate back to 1 shell count

master
Evan Chen 2021-11-17 12:48:10 +08:00
parent a5e826e284
commit 96209b847a
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,9 @@ var ctrLck sync.Mutex
func ctr() int { func ctr() int {
ctrLck.Lock() ctrLck.Lock()
defer ctrLck.Unlock() defer ctrLck.Unlock()
if curCtr >= 99 {
curCtr = 0
}
curCtr++ curCtr++
return curCtr return curCtr
} }