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.
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.