should not break if poll timeout (#19578)

old-commit-hash: 37826c00324cc8f9c9eae9650cafc0df6c838ebe
This commit is contained in:
Dean Lee
2021-01-04 17:17:52 +08:00
committed by GitHub
parent ce15e58010
commit 3fa5602f75
2 changed files with 2 additions and 2 deletions

View File

@@ -2148,7 +2148,7 @@ void cameras_run(MultiCameraState *s) {
fds[1].events = POLLPRI;
int ret = poll(fds, ARRAYSIZE(fds), 1000);
if (ret <= 0) {
if (ret < 0) {
if (errno == EINTR || errno == EAGAIN) continue;
LOGE("poll failed (%d - %d)", ret, errno);
break;

View File

@@ -1167,7 +1167,7 @@ void cameras_run(MultiCameraState *s) {
fds[0].events = POLLPRI;
int ret = poll(fds, ARRAYSIZE(fds), 1000);
if (ret <= 0) {
if (ret < 0) {
if (errno == EINTR || errno == EAGAIN) continue;
LOGE("poll failed (%d - %d)", ret, errno);
break;