mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-09 15:42:11 +08:00
No logging on EINTR, and log all the errnos
old-commit-hash: a4c94128c2ee9824dd4763e7d0ba4d3db3a99fe4
This commit is contained in:
@@ -2117,10 +2117,7 @@ void cameras_run(DualCameraState *s) {
|
||||
|
||||
int ret = poll(fds, ARRAYSIZE(fds), 1000);
|
||||
if (ret <= 0) {
|
||||
if (errno == EINTR){
|
||||
LOGW("poll EINTR");
|
||||
continue;
|
||||
}
|
||||
if (errno == EINTR) continue;
|
||||
LOGE("poll failed (%d - %d)", ret, errno);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -799,11 +799,8 @@ void* visionserver_thread(void* arg) {
|
||||
|
||||
int ret = zmq_poll(polls, ARRAYSIZE(polls), -1);
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR){
|
||||
LOGW("poll EINTR");
|
||||
continue;
|
||||
}
|
||||
LOGE("poll failed (%d)", ret);
|
||||
if (errno == EINTR) continue;
|
||||
LOGE("poll failed (%d - %d)", ret, errno);
|
||||
break;
|
||||
}
|
||||
if (polls[0].revents) {
|
||||
|
||||
+2
-5
@@ -598,12 +598,9 @@ static void ui_update(UIState *s) {
|
||||
int ret = zmq_poll(polls, 1, 1000);
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
if (errno == EINTR){
|
||||
LOGW("poll EINTR");
|
||||
continue;
|
||||
}
|
||||
if (errno == EINTR) continue;
|
||||
|
||||
LOGW("poll failed (%d)", ret);
|
||||
LOGE("poll failed (%d - %d)", ret, errno);
|
||||
close(s->ipc_fd);
|
||||
s->ipc_fd = -1;
|
||||
s->vision_connected = false;
|
||||
|
||||
Reference in New Issue
Block a user