diff options
-rw-r--r-- | src/ranch.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ranch.erl b/src/ranch.erl index e8db34e..9f764d3 100644 --- a/src/ranch.erl +++ b/src/ranch.erl @@ -125,7 +125,7 @@ get_protocol_options(Ref) -> set_protocol_options(Ref, Opts) -> ranch_server:set_protocol_options(Ref, Opts). --spec filter_options([{atom(), any()} | {raw, any(), any(), any()}], +-spec filter_options([inet | inet6 | {atom(), any()} | {raw, any(), any(), any()}], [atom()], Acc) -> Acc when Acc :: [any()]. filter_options(UserOptions, AllowedKeys, DefaultOptions) -> AllowedOptions = filter_user_options(UserOptions, AllowedKeys), @@ -147,6 +147,8 @@ filter_user_options([Opt = {raw, _, _, _}|Tail], AllowedKeys) -> true -> [Opt|filter_user_options(Tail, AllowedKeys)]; false -> filter_user_options(Tail, AllowedKeys) end; +filter_user_options([_|Tail], AllowedKeys) -> + filter_user_options(Tail, AllowedKeys); filter_user_options([], _) -> []. |