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 roundrobin overflow bug. #3

Merged
merged 1 commit into from Aug 10, 2016

Conversation

Projects
None yet
2 participants
@reterVision
Contributor

reterVision commented Aug 4, 2016

No description provided.

@reterVision

This comment has been minimized.

Show comment
Hide comment
@reterVision

reterVision Aug 6, 2016

Contributor

@benschw any feedbacks on this?

Contributor

reterVision commented Aug 6, 2016

@benschw any feedbacks on this?

@benschw

This comment has been minimized.

Show comment
Hide comment
@benschw

benschw Aug 8, 2016

Owner

sorry for not getting back to you sooner.

I'm a little confused though, what is problem is this solving? does taking the modulus account for something that resetting the "i" cursor to 0 doesn't?

Owner

benschw commented Aug 8, 2016

sorry for not getting back to you sooner.

I'm a little confused though, what is problem is this solving? does taking the modulus account for something that resetting the "i" cursor to 0 doesn't?

}
srv = srvs[i]
s.m[key].i += 1
s.m[key].i = i + 1

This comment has been minimized.

@reterVision

reterVision Aug 10, 2016

Contributor

The difference is here @benschw , original code set i to s.m[key].i which leads to a situation that after i reaches the largest index, srv will only get the first value in the array.

@reterVision

reterVision Aug 10, 2016

Contributor

The difference is here @benschw , original code set i to s.m[key].i which leads to a situation that after i reaches the largest index, srv will only get the first value in the array.

@benschw

This comment has been minimized.

Show comment
Hide comment
@benschw

benschw Aug 10, 2016

Owner

10-4, thanks!

Owner

benschw commented Aug 10, 2016

10-4, thanks!

@benschw benschw merged commit 1396bef into benschw:master Aug 10, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment