Fix alarm setting typo treshold
-> threshold
#350
+39
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #349.
The misspelled option
treshold
is still accepted byranch:start_listener/5
andranch:set_transport_options/2
, and will be normalized tothreshold
internally. The transport options are however stored inranch_server
as they were given (ie, with possibly misspelledtreshold
s), such thatranch: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 fromranch:get_transport_options/1
.I also changed the
alarm
type by changing thetreshold
key tothreshold
. I did, however, not do anything to also allow thetreshold
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.