RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout.
This commit is contained in:
parent
7e518a6648
commit
6f7a9f7c8d
@ -1541,8 +1541,12 @@ pps_fetch(struct pps_fetch_args *fapi, struct pps_state *pps)
|
||||
} else {
|
||||
err = tsleep(pps, PCATCH, "ppsfch", timo);
|
||||
}
|
||||
if (err == EWOULDBLOCK && fapi->timeout.tv_sec == -1) {
|
||||
continue;
|
||||
if (err == EWOULDBLOCK) {
|
||||
if (fapi->timeout.tv_sec == -1) {
|
||||
continue;
|
||||
} else {
|
||||
return (ETIMEDOUT);
|
||||
}
|
||||
} else if (err != 0) {
|
||||
return (err);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user