cangen: 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
4858b2b307
commit
c142ca63c9
2
cangen.c
2
cangen.c
|
|
@ -504,7 +504,7 @@ resend:
|
||||||
}
|
}
|
||||||
if (polltimeout) {
|
if (polltimeout) {
|
||||||
/* wait for the write socket (with timeout) */
|
/* wait for the write socket (with timeout) */
|
||||||
if (poll(&fds, 1, polltimeout) < 0) {
|
if (poll(&fds, 1, polltimeout) <= 0) {
|
||||||
perror("poll");
|
perror("poll");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue