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

Ignore multiple duplicate port declarations #657

Merged
merged 1 commit into from Feb 19, 2015

Conversation

schneems
Copy link
Contributor

Right now if you specify a port via -p $PORT and via a config/puma.rb then puma will incorrectly try to bind to the same port twice and will fail.

This PR calls uniq! on the array to remove duplicate ports from the binds array. It also emits a warning when binds or port is called with an already existing port specified:

Warning :binds or :port specified twice: "test/config/app.rb:1:in `_load_from'"

@evanphx
Copy link
Member

evanphx commented Feb 17, 2015

The only problem here is that legit uses of bind multiple times will now warn. Issuing the uniq! is probably enough.

@schneems
Copy link
Contributor Author

I removed the warning.

Right now if you specify a port via `-p $PORT` and via a `config/puma.rb` then puma will incorrectly try to bind to the same port twice and will fail.

This PR calls `uniq!` on the array to remove duplicate ports from the `binds` array.
evanphx added a commit that referenced this pull request Feb 19, 2015
Ignore multiple duplicate port declarations
@evanphx evanphx merged commit 3c93cc4 into puma:master Feb 19, 2015
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