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>pull/336/head
parent
3342eb42e7
commit
7af4264a13
|
|
@ -216,7 +216,7 @@ static void do_send()
|
||||||
}
|
}
|
||||||
|
|
||||||
err = poll(fds, 1, 1000);
|
err = poll(fds, 1, 1000);
|
||||||
if (err == -1 && errno != -EINTR) {
|
if (err == 0 || (err == -1 && errno != -EINTR)) {
|
||||||
perror("poll()");
|
perror("poll()");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue