Merge pull request #21 from emqx/remove_unused_opts

Remove the on_reconnect from pool opts
This commit is contained in:
turtleDeng 2020-03-26 19:56:57 +08:00 committed by GitHub
commit 0b597baa9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ tmp
_build/
rebar.lock
logs/
.rebar3

View File

@ -177,12 +177,13 @@ connect(#state{mod = Mod, opts = Opts, id = Id}) ->
connopts([], Acc) ->
Acc;
connopts([{pool_size, _}|Opts], Acc) ->
connopts(Opts, Acc);
connopts([{pool_type, _}|Opts], Acc) ->
connopts(Opts, Acc);
connopts([{auto_reconnect, _}|Opts], Acc) ->
connopts([{Key, _}|Opts], Acc)
when Key =:= pool_size;
Key =:= pool_type;
Key =:= auto_reconnect;
Key =:= on_reconnect ->
connopts(Opts, Acc);
connopts([Opt|Opts], Acc) ->
connopts(Opts, [Opt|Acc]).