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

Assure worker index is always within 0...@options[:workers] #446

Merged
merged 1 commit into from
Jan 27, 2014

Conversation

sudara
Copy link
Contributor

@sudara sudara commented Jan 27, 2014

This addresses the minor issue I brought up in #440.

next_worker_index will now always be a number between 0 and the number of workers configured.

I also added an integration test (t3.rb) that boots multiple workers and utilizes on_worker_boot. Perhaps it's testing too many things at once (multiple workers, on_worker_boot hook, index) — but it felt nice to have that code path tested.

Feel free to pull or just use as inspiration :)

evanphx added a commit that referenced this pull request Jan 27, 2014
Assure worker index is always within 0...@options[:workers]
@evanphx evanphx merged commit b57a7d7 into puma:master Jan 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants