1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

libsa: Partially revert r330023

The removal of tmo >= MAXTMO check should not have been done; this is
specifically what handles timeout if MAXWAIT == 0.

MFC after:	1 week
This commit is contained in:
Kyle Evans 2018-02-26 18:24:24 +00:00
parent 2b08b42bae
commit ba37055c96
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330028

View File

@ -110,6 +110,10 @@ sendrecv(struct iodesc *d,
return -1;
}
if (tleft <= 0) {
if (tmo >= MAXTMO) {
errno = ETIMEDOUT;
return -1;
}
cc = (*sproc)(d, sbuf, ssize);
if (cc != -1 && cc < ssize)
panic("sendrecv: short write! (%zd < %zd)",