fix(emqx_connector_mqtt_worker): publish_async can only return ok # Please enter the commit message for your changes. Lines starting

This commit is contained in:
Zaiming (Stone) Shi 2023-02-02 14:01:27 +01:00
parent c0d478bd41
commit 1c748070c1
1 changed files with 2 additions and 6 deletions

View File

@ -257,12 +257,8 @@ send_to_remote_async(Name, MsgIn, Callback) ->
do_send_async(Name, {true, Msg}, Callback) ->
Pid = get_pid(Name),
case emqtt:publish_async(Pid, Msg, _Timeout = infinity, Callback) of
ok ->
ok = emqtt:publish_async(Pid, Msg, _Timeout = infinity, Callback),
{ok, Pid};
{error, _} = Error ->
Error
end;
do_send_async(_Name, false, _Callback) ->
ok.