cangen: Do not treat -EINTR as error

This commit is contained in:
Stefan Herbrechtsmeier
2022-01-27 15:53:10 +01:00
parent c142ca63c9
commit 3342eb42e7
+4 -1
View File
@@ -503,8 +503,11 @@ resend:
return 1; return 1;
} }
if (polltimeout) { if (polltimeout) {
int ret;
/* wait for the write socket (with timeout) */ /* wait for the write socket (with timeout) */
if (poll(&fds, 1, polltimeout) <= 0) { ret = poll(&fds, 1, polltimeout);
if (ret == 0 || (ret == -1 && errno != -EINTR)) {
perror("poll"); perror("poll");
return 1; return 1;
} }