cansequence: exit program with failure in case of poll timeout

The poll function returns 0 to indicate a call timed out.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
This commit is contained in:
Stefan Herbrechtsmeier
2022-01-27 15:53:10 +01:00
parent 3342eb42e7
commit 7af4264a13
+1 -1
View File
@@ -216,7 +216,7 @@ static void do_send()
}
err = poll(fds, 1, 1000);
if (err == -1 && errno != -EINTR) {
if (err == 0 || (err == -1 && errno != -EINTR)) {
perror("poll()");
exit(EXIT_FAILURE);
}