No logging on EINTR, and log all the errnos

pull/1247/head
Willem Melching 2020-03-16 14:58:21 -07:00
parent 439b4625b6
commit a4c94128c2
3 changed files with 5 additions and 14 deletions

View File

@ -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;
}

View File

@ -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) {

View File

@ -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;