Update subscription.go

This commit is contained in:
viktorking7 2025-09-28 15:29:17 +02:00 committed by GitHub
parent b19452dc11
commit 7163db134d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,8 @@ func randomIDGenerator() func() ID {
if _, err := crand.Read(buf); err == nil { if _, err := crand.Read(buf); err == nil {
seed = int64(binary.BigEndian.Uint64(buf)) seed = int64(binary.BigEndian.Uint64(buf))
} else { } else {
seed = int64(time.Now().Nanosecond()) // Fallback: use UnixNano for higher entropy than Nanosecond-only value
seed = time.Now().UnixNano()
} }
var ( var (