Skip to content

Commit

Permalink
replace now.After with !now.Before, insteading of checking for equality
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick authored and davecgh committed Oct 15, 2024
1 parent ab3744b commit 10a2845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mixing/mixclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ func (c *Client) prDelay(ctx context.Context, p *peer) error {
sendBefore := epoch.Add(-timeoutDuration - maxJitter)
sendAfter := epoch.Add(timeoutDuration)
var wait time.Duration
if now.Equal(sendBefore) || now.After(sendBefore) {
if !now.Before(sendBefore) {
wait = sendAfter.Sub(now)
sendBefore = sendBefore.Add(c.epoch)
}
Expand Down

0 comments on commit 10a2845

Please sign in to comment.