diff --git a/cangen.c b/cangen.c index 549c8e3..916bbb8 100644 --- a/cangen.c +++ b/cangen.c @@ -504,7 +504,7 @@ resend: } if (polltimeout) { /* wait for the write socket (with timeout) */ - if (poll(&fds, 1, polltimeout) < 0) { + if (poll(&fds, 1, polltimeout) <= 0) { perror("poll"); return 1; }