зеркало из https://github.com/mozilla/pjs.git
Bugzilla bug 136251: the assertion "xferred <= op->nbytes_to_send" should
not be applied when sendfilev() fails with a real error.
This commit is contained in:
Родитель
e3d49c54d9
Коммит
2c911fb2cc
|
@ -1060,9 +1060,8 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
|
|||
ssize_t count;
|
||||
|
||||
count = SOLARIS_SENDFILEV(op->arg1.osfd, vec, op->arg3.amount, &xferred);
|
||||
PR_ASSERT((count == -1) || (count == xferred));
|
||||
PR_ASSERT(xferred <= op->nbytes_to_send);
|
||||
op->syserrno = errno;
|
||||
PR_ASSERT((count == -1) || (count == xferred));
|
||||
|
||||
if (count == -1) {
|
||||
if (op->syserrno != EWOULDBLOCK && op->syserrno != EAGAIN
|
||||
|
@ -1072,6 +1071,7 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
|
|||
}
|
||||
count = xferred;
|
||||
}
|
||||
PR_ASSERT(count <= op->nbytes_to_send);
|
||||
|
||||
op->result.code += count;
|
||||
if (count < op->nbytes_to_send) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче