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 alarm setting typo treshold -> threshold #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juhlig
Copy link
Contributor

@juhlig juhlig commented Oct 2, 2024

Fixes #349.

The misspelled option treshold is still accepted by ranch:start_listener/5 and ranch:set_transport_options/2, and will be normalized to threshold internally. The transport options are however stored in ranch_server as they were given (ie, with possibly misspelled tresholds), such that ranch:get_transport_options/1 returns them unchanged. It would have been easier to store them normalized, but there is an (admittedly off) chance that this may break existing code which has expectations as to the naming of the key in the return from ranch:get_transport_options/1.

I also changed the alarm type by changing the treshold key to threshold. I did, however, not do anything to also allow the treshold key there, so dialyzer may (ie, I didn't check) complain on existing code using it. I think this is just as well, since it would serve as an incentive to adapt.

The documentation has been adapted by replacing all occurrences of "treshold" or "Treshold" with "threshold" or "Threshold", respectively. The treshold key is now effectively undocumented.

The respective test acceptor_SUITE:misc_connection_alarms, which uses two alarms, has been changed such that one uses the properly spelled and one the misspelled option.

The setting `threshold` was misspelled as `treshold`.
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.

Ranch alarms option typo
2 participants