fix(bridge_redis): fix `on_stop` `function_clause` error when there's no state

Fixes https://emqx.atlassian.net/browse/EMQX-10215
This commit is contained in:
Thales Macedo Garitezi 2023-06-09 13:37:08 -03:00
parent 219b424c84
commit 8dbce762ca
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{application, emqx_ee_connector, [
{description, "EMQX Enterprise connectors"},
{vsn, "0.1.13"},
{vsn, "0.1.14"},
{registered, []},
{applications, [
kernel,

View File

@ -44,7 +44,9 @@ on_start(InstId, #{command_template := CommandTemplate} = Config) ->
end.
on_stop(InstId, #{conn_st := RedisConnSt}) ->
emqx_connector_redis:on_stop(InstId, RedisConnSt).
emqx_connector_redis:on_stop(InstId, RedisConnSt);
on_stop(InstId, undefined = _State) ->
emqx_connector_redis:on_stop(InstId, undefined).
on_get_status(InstId, #{conn_st := RedisConnSt}) ->
emqx_connector_redis:on_get_status(InstId, RedisConnSt).