|
|
@@ -211,7 +211,7 @@ on_query_async(
|
|
|
Callback = {fun on_async_result/2, [CallbackIn]},
|
|
|
#message{topic = Topic, qos = QoS} = FwdMsg,
|
|
|
%% TODO check message ordering, pick by topic,client pair?
|
|
|
- ecpool:pick_and_do(
|
|
|
+ Result = ecpool:pick_and_do(
|
|
|
{PoolName, Topic},
|
|
|
fun(ConnPid) ->
|
|
|
%% #delivery{} record has no valuable data for a remote link...
|
|
|
@@ -226,7 +226,10 @@ on_query_async(
|
|
|
PubResult
|
|
|
end,
|
|
|
no_handover
|
|
|
- ).
|
|
|
+ ),
|
|
|
+ %% This result could be `{error, ecpool_empty}', for example, which should be
|
|
|
+ %% recoverable. If we didn't handle it here, it would be considered unrecoverable.
|
|
|
+ handle_send_result(Result).
|
|
|
|
|
|
%% copied from emqx_bridge_mqtt_connector
|
|
|
|