Skip to content

Commit

Permalink
Fixed ctx random seed to nanosecond to prevent the randomID generated…
Browse files Browse the repository at this point in the history
… by receiving concurrent requests from being consistent (#50)
  • Loading branch information
DukeAnn authored Jan 18, 2024
1 parent 0d8f4d5 commit 2c72092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewContext(ctx context.Context, client *tg.Client, peerStorage *storage.Pee
Self: self,
Sender: sender,
Entities: entities,
random: rand.New(rand.NewSource(time.Now().Unix())),
random: rand.New(rand.NewSource(time.Now().UnixNano())),
setReply: setReply,
PeerStorage: peerStorage,
}
Expand Down

0 comments on commit 2c72092

Please sign in to comment.