docs: note that connector state must be immutable to avoid errors
This commit is contained in:
parent
ba96c725e5
commit
ffce6fefa8
|
@ -141,6 +141,9 @@ connect(Opts0) ->
|
|||
{Topic, MQTTConfig} = lists:nth(Index, TopicMappingList),
|
||||
Config = #{
|
||||
ack_retry_interval => AckRetryInterval,
|
||||
%% Note: the `connector_state' value here must be immutable and not changed by the
|
||||
%% bridge during `on_get_status', since we have handed it over to the pull
|
||||
%% workers.
|
||||
connector_state => ConnectorState,
|
||||
hookpoint => Hookpoint,
|
||||
instance_id => InstanceId,
|
||||
|
|
|
@ -69,6 +69,8 @@ on_stop(InstanceId, undefined = _State) ->
|
|||
|
||||
-spec on_get_status(resource_id(), state()) -> connected | disconnected.
|
||||
on_get_status(InstanceId, _State) ->
|
||||
%% Note: do *not* alter the `connector_state' value here. It must be immutable, since
|
||||
%% we have handed it over to the pull workers.
|
||||
case
|
||||
emqx_resource_pool:health_check_workers(
|
||||
InstanceId,
|
||||
|
|
Loading…
Reference in New Issue