mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout.
This commit is contained in:
parent
7e518a6648
commit
6f7a9f7c8d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286423
@ -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…
Reference in New Issue
Block a user