Camerad add errno logging, and continue on EINTR

old-commit-hash: 7669a783d62cde5514a5577d40018690d4c469c6
This commit is contained in:
Willem Melching
2020-03-16 14:40:24 -07:00
parent 1335be2843
commit 4b1c53993a
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -2117,7 +2117,8 @@ void cameras_run(DualCameraState *s) {
int ret = poll(fds, ARRAYSIZE(fds), 1000);
if (ret <= 0) {
LOGE("poll failed (%d)", ret);
if (errno == EINTR) continue;
LOGE("poll failed (%d - %d)", ret, errno);
break;
}
@@ -2210,4 +2211,4 @@ void cameras_run(DualCameraState *s) {
void cameras_close(DualCameraState *s) {
camera_close(&s->rear);
camera_close(&s->front);
}
}
+1 -1
View File
@@ -605,7 +605,7 @@ void* visionserver_client_thread(void* arg) {
int ret = zmq_poll(polls, num_polls, -1);
if (ret < 0) {
if (errno == EINTR) continue;
LOGE("poll failed (%d)", ret);
LOGE("poll failed (%d - %d)", ret, errno);
break;
}
if (polls[0].revents) {