Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: jitter maxWaitTime must be >= 1ns #629

Merged
merged 1 commit into from Mar 19, 2023

Conversation

segevda
Copy link
Contributor

@segevda segevda commented Mar 13, 2023

rand.Rand.Int63n panics when passed a non-positive int. When maxWaitTime is 1ns, max/2 is zero.

Fixes #624

@codecov
Copy link

codecov bot commented Mar 13, 2023

Codecov Report

Merging #629 (4e48b5d) into master (9943eab) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #629   +/-   ##
=======================================
  Coverage   95.82%   95.83%           
=======================================
  Files          11       11           
  Lines        1557     1559    +2     
=======================================
+ Hits         1492     1494    +2     
  Misses         40       40           
  Partials       25       25           
Impacted Files Coverage Δ
retry.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@jeevatkm jeevatkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@segevda Thanks for your contribution.

@jeevatkm jeevatkm added the bug label Mar 19, 2023
@jeevatkm jeevatkm added this to the v2.8.0 Milestone milestone Mar 19, 2023
@jeevatkm jeevatkm merged commit 38b1644 into go-resty:master Mar 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

jitterBackoff Panic When max = 1 ns
2 participants