this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix TID generator to avoid duplicates (#451)

Third call on the same microsecond would not match the `if` condition
and would return the same value as the first call.

authored by

bnewbold and committed by
GitHub
1c058927 a18c4f45

+2 -2
+2 -2
repo/tid.go
··· 30 30 t := uint64(time.Now().UnixMicro()) 31 31 32 32 ltLock.Lock() 33 - if lastTime == t { 34 - t++ 33 + if lastTime >= t { 34 + t = lastTime + 1 35 35 } 36 36 37 37 lastTime = t