mirror of
https://github.com/emqx/neuron.git
synced 2026-10-30 16:09:02 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3773949923 | ||
|
|
1bca0ace2a | ||
|
|
49636caebb | ||
|
|
77ce24a134 | ||
|
|
e26bb68505 | ||
|
|
538f59a0b9 | ||
|
|
8badd4957a | ||
|
|
48ff59f833 | ||
|
|
e5cfd7142c |
@@ -155,9 +155,10 @@ int json_encode_read_resp_tags(void *json_object, void *param)
|
||||
}
|
||||
|
||||
neu_json_elem_t tag_elem = {
|
||||
.name = json_tag.name,
|
||||
.t = json_tag.t,
|
||||
.v = json_tag.value,
|
||||
.name = json_tag.name,
|
||||
.t = json_tag.t,
|
||||
.v = json_tag.value,
|
||||
.precision = trans_data->tags[i].value.precision,
|
||||
};
|
||||
|
||||
ret = neu_json_encode_field((0 != json_tag.error) ? errors_object
|
||||
|
||||
@@ -61,7 +61,7 @@ neu_adapter_t *neu_adapter_create(neu_adapter_info_t *info)
|
||||
neu_event_io_param_t param = { 0 };
|
||||
neu_event_timer_param_t timer_param = {
|
||||
.second = 0,
|
||||
.millisecond = 100,
|
||||
.millisecond = 10,
|
||||
.cb = update_timestamp,
|
||||
};
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ ssize_t neu_conn_recv(neu_conn_t *conn, uint8_t *buf, ssize_t len)
|
||||
conn->fd, len, ret, strerror(errno), errno);
|
||||
}
|
||||
|
||||
if (errno == EPIPE || ret <= 0) {
|
||||
if (errno == EPIPE || ret == -1) {
|
||||
conn_disconnect(conn);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,10 @@ static void *event_loop(void *arg)
|
||||
assert(size != -1);
|
||||
|
||||
nng_mtx_lock(data->ctx.timer->mtx);
|
||||
epoll_ctl(epoll_fd, EPOLL_CTL_DEL, data->fd, NULL);
|
||||
ret = data->callback.timer(data->usr_data);
|
||||
timerfd_settime(data->fd, 0, &data->ctx.timer->value, NULL);
|
||||
epoll_ctl(epoll_fd, EPOLL_CTL_ADD, data->fd, &event);
|
||||
nng_mtx_unlock(data->ctx.timer->mtx);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user