mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
improve(modbus): speed up the recovery the modbus rtu
This commit is contained in:
@@ -159,6 +159,7 @@ int modbus_group_timer(neu_plugin_t *plugin, neu_plugin_group_t *group,
|
||||
modbus_value_handle(plugin, gd->cmd_sort->cmd[i].slave_id, 0, NULL,
|
||||
NEU_ERR_PLUGIN_DISCONNECTED);
|
||||
rtt = NEU_METRIC_LAST_RTT_MS_MAX;
|
||||
neu_conn_disconnect(plugin->conn);
|
||||
}
|
||||
if (plugin->interval > 0) {
|
||||
struct timespec t1 = { .tv_sec = plugin->interval / 1000,
|
||||
|
||||
@@ -89,10 +89,6 @@ static void *event_loop(void *arg)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ret == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ret == -1 || events->stop) {
|
||||
zlog_warn(neuron, "event loop exit, errno: %s(%d), stop: %d",
|
||||
strerror(errno), errno, events->stop);
|
||||
|
||||
Reference in New Issue
Block a user