mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
修复srs_write_large_iovs中nwrite未累加的错误
This commit is contained in:
parent
f9114770af
commit
bbfb03f98a
1 changed files with 6 additions and 2 deletions
|
@ -345,12 +345,16 @@ srs_error_t srs_write_large_iovs(ISrsProtocolReadWriter* skt, iovec* iovs, int s
|
|||
|
||||
// send in multiple times.
|
||||
int cur_iov = 0;
|
||||
ssize_t nwrite = 0;
|
||||
while (cur_iov < size) {
|
||||
int cur_count = srs_min(limits, size - cur_iov);
|
||||
if ((err = skt->writev(iovs + cur_iov, cur_count, pnwrite)) != srs_success) {
|
||||
if ((err = skt->writev(iovs + cur_iov, cur_count, &nwrite)) != srs_success) {
|
||||
return srs_error_wrap(err, "writev");
|
||||
}
|
||||
cur_iov += cur_count;
|
||||
if (pnwrite) {
|
||||
*pnwrite += nwrite;
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue